Mercurial > octave-libtiff
changeset 28981:d632d99d5c2e
maint: merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 22 Oct 2020 11:20:26 -0400 |
parents | c6f81afdcd28 (current diff) a745a046b705 (diff) |
children | 08a01acc2fcf |
files | libinterp/corefcn/error.cc libinterp/parse-tree/pt-eval.cc |
diffstat | 2 files changed, 26 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc Thu Oct 22 14:07:35 2020 +0200 +++ b/libinterp/corefcn/error.cc Thu Oct 22 11:20:26 2020 -0400 @@ -894,25 +894,6 @@ void error_system::throw_error (execution_exception& ex) { - tree_evaluator& tw = m_interpreter.get_evaluator (); - - bp_table& bptab = tw.get_bp_table (); - - if ((m_interpreter.interactive () || application::forced_interactive ()) - && ((debug_on_error () - && bptab.debug_on_err (last_error_id ())) - || (debug_on_caught () - && bptab.debug_on_caught (last_error_id ()))) - && tw.in_user_code ()) - { - save_exception (ex); - display_exception (ex, std::cerr); - - tw.enter_debugger (); - } - - // Throw the exception even if we entered the debugger. - throw ex; }
--- a/libinterp/parse-tree/pt-eval.cc Thu Oct 22 14:07:35 2020 +0200 +++ b/libinterp/parse-tree/pt-eval.cc Thu Oct 22 11:20:26 2020 -0400 @@ -3193,6 +3193,32 @@ else throw; } + catch (const execution_exception& ee) + { + error_system& es = m_interpreter.get_error_system (); + + if ((m_interpreter.interactive () + || application::forced_interactive ()) + && ((es.debug_on_error () + && m_bp_table.debug_on_err (es.last_error_id ())) + || (es.debug_on_caught () + && m_bp_table.debug_on_caught (es.last_error_id ()))) + && in_user_code ()) + { + es.save_exception (ee); + es.display_exception (ee, std::cerr); + + enter_debugger (); + + // It doesn't make sense to continue execution after an + // error occurs so force the debugger to quit all debug + // levels and return the the top prompt. + + throw quit_debug_exception (true); + } + else + throw; + } } }