Mercurial > octave
diff libinterp/corefcn/cellfun.cc @ 20756:200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
* gripes.h, gripes.cc (gripe_user_supplied_eval,
gripe_wrong_type_arg): New overloaded functions that accept
octave_execution_exception objects.
* error.h, error.cc (error, verror, error_1, usage_1,
debug_or_throw_exception): New overloaded functions that accept
* octave_execution_exception objects.
* __qp__.cc, cellfun.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc,
file-io.cc, graphics.cc, graphics.in.h, input.cc, load-path.cc,
ls-mat-ascii.cc, lsode.cc, mex.cc, oct-handle.h, oct-map.cc,
oct-stream.cc, quad.cc, rand.cc, toplev.cc, utils.cc, variables.cc,
__eigs__.cc, ov-base.cc, ov-class.cc, ov-fcn-handle.cc,
ov-oncleanup.cc, ov.cc, octave.cc, oct-parse.in.yy: Propagate
octave_execution_exception objects through try/catch blocks.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Nov 2015 15:27:48 -0500 |
parents | 68e3a747ca02 |
children | a6eaedd8bd75 |
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc Wed Nov 25 11:32:28 2015 -0800 +++ b/libinterp/corefcn/cellfun.cc Wed Nov 25 15:27:48 2015 -0500 @@ -41,25 +41,26 @@ #include "defun.h" #include "parse.h" #include "variables.h" -#include "ov-colon.h" #include "unwind-prot.h" #include "gripes.h" +#include "toplev.h" #include "utils.h" +#include "ov-bool.h" #include "ov-class.h" -#include "ov-scalar.h" -#include "ov-float.h" +#include "ov-colon.h" #include "ov-complex.h" +#include "ov-float.h" #include "ov-flt-complex.h" -#include "ov-bool.h" -#include "ov-int8.h" #include "ov-int16.h" #include "ov-int32.h" #include "ov-int64.h" -#include "ov-uint8.h" +#include "ov-int8.h" +#include "ov-scalar.h" #include "ov-uint16.h" #include "ov-uint32.h" #include "ov-uint64.h" +#include "ov-uint8.h" #include "ov-fcn-handle.h" @@ -77,12 +78,16 @@ { tmp = func.do_multi_index_op (nargout, inputlist); } - catch (const octave_execution_exception&) + catch (const octave_execution_exception& e) { if (error_handler.is_defined ()) - execution_error = true; + { + recover_from_exception (); + + execution_error = true; + } else - octave_throw_execution_exception (); + throw e; } if (execution_error)