diff src/octave.cc @ 9217:ee7cf4d963f3

smarter handling of quit()
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 20 May 2009 09:52:03 +0200
parents eb1747dbd360
children 1c2d2c9f4a8d
line wrap: on
line diff
--- a/src/octave.cc	Tue May 19 12:49:57 2009 -0400
+++ b/src/octave.cc	Wed May 20 09:52:03 2009 +0200
@@ -411,6 +411,11 @@
     {
       eval_string (code, false, parse_status, 0);
     }
+  catch (octave_quit_exception e)
+    {
+      unwind_protect::run_frame ("execute_eval_option_code");
+      clean_up_and_exit (e.status);
+    }
   catch (octave_interrupt_exception)
     {
       recover_from_exception ();
@@ -478,6 +483,11 @@
 
       source_file (fname, context, verbose, require_file, "octave");
     }
+  catch (octave_quit_exception e)
+    {
+      unwind_protect::run_frame ("execute_command_line_file");
+      clean_up_and_exit (e.status);
+    }
   catch (octave_interrupt_exception)
     {
       recover_from_exception ();