Mercurial > octave
changeset 27592:637279c8caba
* intepreter.cc (interpreter::quit): Fix exception handling logic.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 30 Oct 2019 13:52:27 -0400 |
parents | b54d6ac62fbf |
children | a2db1e36e9b2 |
files | libinterp/corefcn/interpreter.cc |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Wed Oct 30 13:24:59 2019 -0400 +++ b/libinterp/corefcn/interpreter.cc Wed Oct 30 13:52:27 2019 -0400 @@ -1745,9 +1745,6 @@ { try { - // Attempt to execute finish.m. If it throws an - // exception, cancel quitting. - bool cancel = false; if (symbol_exist ("finish.m", "file")) @@ -1768,11 +1765,16 @@ if (confirm && ! m_event_manager.confirm_shutdown ()) return; } - catch (const execution_exception& ee) + catch (const execution_exception&) { - handle_exception (ee); + // Catch execution_exceptions so we don't throw an + // exit_exception if there is an in finish.m. But throw it + // again so that will be handled as any other + // execution_exception by the evaluator. This way, errors + // will be ignored properly and we won't exit if quit is + // called recursively from finish.m. - return; + throw; } }