Mercurial > octave
changeset 29029:7c9a40fb3337 stable
recover from exceptions when execution_exception is caught
* oct-lvalue.cc (octave_lvalue::eval_for_numel): Call
interpreter::recover_from_exception when execution_exception is
caught.
* __init_gnuplot__.cc (have_gnuplot_binary): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 05 Nov 2020 12:06:45 -0500 |
parents | 9a84aa8c4552 |
children | ba5a0edff85e a0ff81c8b8e8 |
files | libinterp/dldfcn/__init_gnuplot__.cc libinterp/parse-tree/oct-lvalue.cc |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__init_gnuplot__.cc Thu Nov 05 12:02:13 2020 -0500 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Thu Nov 05 12:06:45 2020 -0500 @@ -47,6 +47,8 @@ #include "defun-dld.h" #include "error.h" #include "graphics.h" +#include "interpreter-private.h" +#include "interpreter.h" #include "ov.h" #include "ovl.h" #include "parse.h" @@ -213,7 +215,12 @@ } } catch (octave::execution_exception&) - { } + { + octave::interpreter& interp + = octave::__get_interpreter__ ("have_gnuplot_binary"); + + interp.recover_from_exception (); + } return retval; }
--- a/libinterp/parse-tree/oct-lvalue.cc Thu Nov 05 12:02:13 2020 -0500 +++ b/libinterp/parse-tree/oct-lvalue.cc Thu Nov 05 12:06:45 2020 -0500 @@ -29,6 +29,8 @@ #include "error.h" #include "errwarn.h" +#include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" #include "oct-lvalue.h" #include "ov.h" @@ -235,6 +237,11 @@ // could happen because there is an index is out of range // and we will be resizing a cell array. + interpreter& interp + = __get_interpreter__ ("octave_lvalue::eval_for_numel"); + + interp.recover_from_exception (); + retval = octave_value (); }