Mercurial > hg > octave-lojdl
changeset 11794:77793a0fad3d release-3-0-x
lasterr, lasterror: unwind-protect error_state
(transplanted from 736124a4fa3d2fdaf9c97dd5be26c6ab35f8b349)
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 28 Jul 2008 14:34:54 -0400 |
parents | db5518a14ea4 |
children | 642af2e62b1f |
files | src/ChangeLog src/error.cc |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-07-28 John W. Eaton <jwe@octave.org> + + * error.cc (Flasterror, Flasterr): Unwind-protect error_state. + 2008-07-24 John W. Eaton <jwe@octave.org> * dirfns.cc (Fmkdir): If directory already exists, return status =
--- a/src/error.cc +++ b/src/error.cc @@ -1458,6 +1458,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; @@ -1582,6 +1587,8 @@ else print_usage (); + unwind_protect::run_frame ("Flasterror"); + return retval; } @@ -1595,6 +1602,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) @@ -1624,6 +1636,8 @@ else print_usage (); + unwind_protect::run_frame ("Flasterr"); + return retval; }