# HG changeset patch # User John W. Eaton # Date 1217270094 14400 # Node ID 736124a4fa3d2fdaf9c97dd5be26c6ab35f8b349 # Parent ed4ec7875f98d5edf692400f2845497f1de1fded lasterr, lasterror: unwind-protect error_state diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-07-28 John W. Eaton + * error.cc (Flasterror, Flasterr): Unwind-protect error_state. + * DLD-FUNCTIONS/__magick_read__.cc (F__magick_write__, write_image): New functions. diff --git a/src/error.cc b/src/error.cc --- 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; }