diff src/pt-eval.cc @ 12011:67ad3b58b99a release-3-2-x

improve error handling
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 24 Jun 2009 07:31:32 +0200
parents eabdfcc977f1
children 664597f88284
line wrap: on
line diff
--- a/src/pt-eval.cc
+++ b/src/pt-eval.cc
@@ -909,6 +909,9 @@
 {
   tree_statement_list *list = static_cast<tree_statement_list *> (ptr);
 
+  unwind_protect_int (octave_interrupt_state);
+  octave_interrupt_state = 0;
+
   // We want to run the cleanup code without error_state being set,
   // but we need to restore its value, so that any errors encountered
   // in the first part of the unwind_protect are not completely
@@ -917,9 +920,6 @@
   unwind_protect_int (error_state);
   error_state = 0;
 
-  unwind_protect_int (octave_interrupt_state);
-  octave_interrupt_state = 0;
-
   // Similarly, if we have seen a return or break statement, allow all
   // the cleanup code to run before returning or handling the break.
   // We don't have to worry about continue statements because they can