Mercurial > hg > octave-nkf
diff src/octave.cc @ 9383:d57f0c56195f
improve error handling
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 23 Jun 2009 15:48:40 +0200 |
parents | 610bf90fce2a |
children | 0fcbfddaa87f |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -398,15 +398,12 @@ { eval_string (code, false, parse_status, 0); } - catch (octave_quit_exception e) - { - unwind_protect::run_frame (uwp_frame); - clean_up_and_exit (e.status); - } catch (octave_interrupt_exception) { recover_from_exception (); octave_stdout << "\n"; + if (quitting_gracefully) + clean_up_and_exit (exit_status); } catch (std::bad_alloc) { @@ -470,15 +467,12 @@ source_file (fname, context, verbose, require_file, "octave"); } - catch (octave_quit_exception e) - { - unwind_protect::run_frame (uwp_frame); - clean_up_and_exit (e.status); - } catch (octave_interrupt_exception) { recover_from_exception (); octave_stdout << "\n"; + if (quitting_gracefully) + clean_up_and_exit (exit_status); } catch (std::bad_alloc) {