changeset 14087:8782d41893c6 stable

Add try-catch block to rundemos. * rundemos.m: Add try-catch block to allow demos to continue when an error occurs. Bug # 35126.
author Ben Abbott <bpabbott@mac.com>
date Wed, 21 Dec 2011 18:58:27 -0500
parents 41511cce0488
children 9c1f630dc03d
files scripts/testfun/rundemos.m
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/rundemos.m	Wed Dec 21 10:12:40 2011 -0800
+++ b/scripts/testfun/rundemos.m	Wed Dec 21 18:58:27 2011 -0500
@@ -62,7 +62,11 @@
     if (length (f) > 2 && strcmp (f((end-1):end), ".m"))
       f = fullfile (directory, f);
       if (has_demos (f))
-        demo (f);
+        try
+          demo (f);
+        catch
+          printf ("error: %s\n\n", lasterror().message)
+        end_try_catch
         if (i != numel (flist))
           input ("Press <enter> to continue: ", "s");
         endif