diff libinterp/octave.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 ee2743bd07a8
children 994c0859ab8b
line wrap: on
line diff
--- a/libinterp/octave.cc	Wed Nov 25 11:32:28 2015 -0800
+++ b/libinterp/octave.cc	Wed Nov 25 15:27:48 2015 -0500
@@ -282,13 +282,16 @@
   catch (const octave_interrupt_exception&)
     {
       recover_from_exception ();
+
       octave_stdout << "\n";
+
       if (quitting_gracefully)
         clean_up_and_exit (exit_status);
     }
   catch (const octave_execution_exception&)
     {
       recover_from_exception ();
+
       gripe_safe_source_exception (file_name, "unhandled execution exception");
     }
 }
@@ -397,13 +400,16 @@
   catch (const octave_interrupt_exception&)
     {
       recover_from_exception ();
+
       octave_stdout << "\n";
+
       if (quitting_gracefully)
         clean_up_and_exit (exit_status);
     }
   catch (const octave_execution_exception&)
     {
       recover_from_exception ();
+
       std::cerr << "error: unhandled execution exception -- eval failed"
                 << std::endl;
     }
@@ -865,6 +871,8 @@
         }
       catch (const octave_execution_exception&)
         {
+          recover_from_exception ();
+
           parse_status = 1;
         }
 
@@ -897,6 +905,8 @@
         }
       catch (const octave_execution_exception&)
         {
+          recover_from_exception ();
+
           exit_status = 1;
         }