diff libinterp/corefcn/rand.cc @ 20785:b6f2909e7f94

always throw exception after debugging with debug_on_error * quit.h (octave_execution_exception::set_stack_trace (void)): New overloaded function. * error.h, error.cc (maybe_enter_debugger): Rename from debug_or_throw_exception. Just handle debugging. Display stack trace from exception object instead of calling pr_where. If stack trace is printed, clear stack trace info from exception object. Pass object as non-const reference. (usage_1, error_1): Throw execption after call to maybe_enter_debugger. Pass exception object by non-const reference. (verror, error): Pass exception object by non-const reference. * gripes.h, gripes.cc (gripe_user_supplied_eval, gripe_wrong_type_arg): Pass exception object by non-const reference. * __qp__.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, file-io.cc, graphics.cc, graphics.in.h, lsode.cc, oct-handle.h, oct-map.cc, quad.cc, rand.cc, toplev.cc, __eigs__.cc, ov-base.cc, ov.cc, oct-parse.in.yy: Catch octave_execution_exception as non-const reference as needed.
author John W. Eaton <jwe@octave.org>
date Wed, 02 Dec 2015 16:54:13 -0500
parents 200ae1d650b7
children a542a9bf177e
line wrap: on
line diff
--- a/libinterp/corefcn/rand.cc	Wed Dec 02 14:41:32 2015 -0500
+++ b/libinterp/corefcn/rand.cc	Wed Dec 02 16:54:13 2015 -0500
@@ -214,7 +214,7 @@
               {
                 iv = tmp.int_vector_value (true);
               }
-            catch (const octave_execution_exception& e)
+            catch (octave_execution_exception& e)
               {
                 error (e, "%s: dimensions must be a scalar or array of integers", fcn);
               }