Mercurial > octave
diff libinterp/corefcn/variables.cc @ 20769:58e79b0078e4
handle exceptions when discarding error messages (bug #46534)
* oct-parse.in.yy (octave_base_parser::finish_colon_expression,
octave_base_parser::finish_array_list): Catch and recover from
exception that may happen when error messages are being discarded.
* graphics.cc (base_graphics_object::remove_all_listeners): Likewise.
* variables.cc (generate_struct_completions): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 27 Nov 2015 11:14:46 -0500 |
parents | 15eefcabcb31 |
children | c349d4c91ce2 |
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc Fri Nov 27 10:46:17 2015 -0500 +++ b/libinterp/corefcn/variables.cc Fri Nov 27 11:14:46 2015 -0500 @@ -268,13 +268,20 @@ discard_error_messages = true; discard_warning_messages = true; - octave_value tmp = eval_string (prefix, true, parse_status); - - frame.run (); - - if (tmp.is_defined () - && (tmp.is_map () || tmp.is_java () || tmp.is_classdef_object ())) - names = tmp.map_keys (); + try + { + octave_value tmp = eval_string (prefix, true, parse_status); + + frame.run (); + + if (tmp.is_defined () + && (tmp.is_map () || tmp.is_java () || tmp.is_classdef_object ())) + names = tmp.map_keys (); + } + catch (const octave_execution_exception&) + { + recover_from_exception (); + } } }