Mercurial > hg > octave-terminal
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 +++ b/scripts/testfun/rundemos.m @@ -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