diff liboctave/cruft/misc/quit.h @ 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 e0e2c2ce7e94
children f7084eae3318
line wrap: on
line diff
--- a/liboctave/cruft/misc/quit.h	Wed Dec 02 14:41:32 2015 -0500
+++ b/liboctave/cruft/misc/quit.h	Wed Dec 02 16:54:13 2015 -0500
@@ -98,12 +98,18 @@
     m_stack_trace = st;
   }
 
+  virtual void set_stack_trace (void)
+  {
+    m_stack_trace = "";
+  }
+
   virtual std::string info (void) const
   {
     return m_stack_trace;
   }
 
 private:
+
   std::string m_stack_trace;
 };