Mercurial > hg > octave-nkf
diff src/sighandlers.cc @ 7481:78f3811155f7
use exceptions in liboctave error handler
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 14 Feb 2008 17:14:23 -0500 |
parents | a1dbe9d80eee |
children | 73c4516fae10 |
line wrap: on
line diff
--- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -357,7 +357,7 @@ // for SIGINT only. static -void user_abort(const char *sig_name, int sig_number) +void user_abort (const char *sig_name, int sig_number) { if (! octave_initialized) exit (1); @@ -378,7 +378,12 @@ } if (octave_interrupt_immediately) - octave_jump_to_enclosing_context (); + { + if (octave_interrupt_state == 0) + octave_interrupt_state = 1; + + octave_jump_to_enclosing_context (); + } else { // If we are already cleaning up from a previous interrupt,