Mercurial > octave
changeset 27591:b54d6ac62fbf
make "quit cancel" a no-op outside of finish script
* interpreter.cc (interpreter::quit): Don't error if "quit cancel"
appears outside of finish script.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 30 Oct 2019 13:24:59 -0400 |
parents | f6b729077ebd |
children | 637279c8caba |
files | libinterp/corefcn/interpreter.cc |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Sat Oct 26 11:31:05 2019 -0400 +++ b/libinterp/corefcn/interpreter.cc Wed Oct 30 13:24:59 2019 -0400 @@ -210,13 +210,12 @@ if (cancel) { + // No effect if "quit cancel" appears outside of finish script. + if (interp.executing_finish_script ()) - { - interp.cancel_quit (true); - return ovl (); - } - else - error (R"(invalid use of "cancel" option)"); + interp.cancel_quit (true); + + return ovl (); } interp.quit (exit_status, force);