Mercurial > hg > octave-nkf
diff src/pt-eval.cc @ 9383:d57f0c56195f
improve error handling
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 23 Jun 2009 15:48:40 +0200 |
parents | bb0697c70c16 |
children | 17af7cce7d1b |
line wrap: on
line diff
--- a/src/pt-eval.cc +++ b/src/pt-eval.cc @@ -903,6 +903,9 @@ { tree_statement_list *list = static_cast<tree_statement_list *> (ptr); + unwind_protect::protect_var (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 @@ -911,9 +914,6 @@ unwind_protect::protect_var (error_state); error_state = 0; - unwind_protect::protect_var (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