Mercurial > octave
changeset 23612:fecca33388f7 stable
also run unwind protect cleanup code on interrupt exceptions (bug #51209)
* pt-eval.cc (tree_evaluator::visit_unwind_protect_command):
Also perform cleanup block for interrupt exceptions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 15 Jun 2017 19:37:04 -0400 |
parents | ff6bcf3d7e1f |
children | 702db65be195 4ce622b7b930 |
files | libinterp/parse-tree/pt-eval.cc |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Thu Jun 15 16:13:26 2017 -0700 +++ b/libinterp/parse-tree/pt-eval.cc Thu Jun 15 19:37:04 2017 -0400 @@ -988,6 +988,13 @@ // exception will be thrown instead of the original. throw; } + catch (const octave::interrupt_exception&) + { + // The comments above apply here as well. + recover_from_exception (); + do_unwind_protect_cleanup_code (cleanup_code); + throw; + } // Also execute the unwind_protect_cleanump code if the // unwind_protect block runs without error.