changeset 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 ed4ec7875f98
children 065c28e1c368
files src/ChangeLog src/error.cc
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Jul 28 14:28:41 2008 +0200
+++ b/src/ChangeLog	Mon Jul 28 14:34:54 2008 -0400
@@ -1,5 +1,7 @@
 2008-07-28  John W. Eaton  <jwe@octave.org>
 
+	* error.cc (Flasterror, Flasterr): Unwind-protect error_state.
+
 	* DLD-FUNCTIONS/__magick_read__.cc (F__magick_write__, write_image):
 	New functions.
 
--- a/src/error.cc	Mon Jul 28 14:28:41 2008 +0200
+++ b/src/error.cc	Mon Jul 28 14:34:54 2008 -0400
@@ -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;  
 }