Mercurial > hg > octave-lyh
diff src/error.cc @ 10066:2cd940306a06
make unwind_protect frames local
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 13:18:41 +0100 |
parents | 892e2aa7bc75 |
children | cd96d29c5efa |
line wrap: on
line diff
--- a/src/error.cc +++ b/src/error.cc @@ -486,7 +486,8 @@ && Vdebug_on_error && init_state == 0 && octave_call_stack::caller_user_code ()) { - unwind_protect::protect_var (Vdebug_on_error); + unwind_protect frame; + frame.protect_var (Vdebug_on_error); Vdebug_on_error = false; error_state = 0; @@ -494,8 +495,6 @@ pr_where ("error"); do_keyboard (octave_value_list ()); - - unwind_protect::run (); } } @@ -677,12 +676,11 @@ && Vdebug_on_warning && octave_call_stack::caller_user_code ()) { - unwind_protect::protect_var (Vdebug_on_warning); + unwind_protect frame; + frame.protect_var (Vdebug_on_warning); Vdebug_on_warning = false; do_keyboard (octave_value_list ()); - - unwind_protect::run (); } } } @@ -1524,9 +1522,9 @@ octave_value retval; int nargin = args.length(); - unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); + unwind_protect frame; - unwind_protect::protect_var (error_state); + frame.protect_var (error_state); error_state = 0; if (nargin < 2) @@ -1631,8 +1629,6 @@ else print_usage (); - unwind_protect::run_frame (uwp_frame); - return retval; } @@ -1646,9 +1642,9 @@ { octave_value_list retval; - unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); + unwind_protect frame; - unwind_protect::protect_var (error_state); + frame.protect_var (error_state); error_state = 0; int argc = args.length () + 1; @@ -1680,8 +1676,6 @@ else print_usage (); - unwind_protect::run_frame (uwp_frame); - return retval; }