Mercurial > hg > octave-lyh
diff src/error.cc @ 7976:736124a4fa3d
lasterr, lasterror: unwind-protect error_state
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 28 Jul 2008 14:34:54 -0400 |
parents | 4816cec8b1ca |
children | 065c28e1c368 |
line wrap: on
line diff
--- a/src/error.cc +++ b/src/error.cc @@ -1441,6 +1441,11 @@ octave_value retval; int nargin = args.length(); + unwind_protect::begin_frame ("Flasterror"); + + unwind_protect_int (error_state); + error_state = 0; + if (nargin < 2) { Octave_map err; @@ -1565,6 +1570,8 @@ else print_usage (); + unwind_protect::run_frame ("Flasterror"); + return retval; } @@ -1578,6 +1585,11 @@ { octave_value_list retval; + unwind_protect::begin_frame ("Flasterr"); + + unwind_protect_int (error_state); + error_state = 0; + int argc = args.length () + 1; if (argc < 4) @@ -1607,6 +1619,8 @@ else print_usage (); + unwind_protect::run_frame ("Flasterr"); + return retval; }