# HG changeset patch # User Ben Abbott # Date 1324511907 18000 # Node ID 8782d41893c6b95f944812ffe95c4f9bfc8c6aab # Parent 41511cce048850cd7ffba148e677b5873f6643c8 Add try-catch block to rundemos. * rundemos.m: Add try-catch block to allow demos to continue when an error occurs. Bug # 35126. diff -r 41511cce0488 -r 8782d41893c6 scripts/testfun/rundemos.m --- 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 to continue: ", "s"); endif