comparison libinterp/octave-value/ov-oncleanup.cc @ 15244:c16357c4bdbb

attempt to display location of out of memory errors in interpreted code * pt-eval.cc (tree_evaluator::visit_statement): Handle std::bad_alloc exception here. * toplev.cc (main_loop): Simplify out-of-memory error message. * octave.cc (safe_source_file): Don't handle std::bad_alloc here. (execute_eval_option_code): Likewise. * ov-oncleanup.cc (octave_oncleanup::~octave_oncleanup): Likewise.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Aug 2012 11:00:53 -0400
parents 2fc554ffbc28
children 72868cae7624
comparison
equal deleted inserted replaced
15243:b241e69306a5 15244:c16357c4bdbb
89 } 89 }
90 catch (octave_interrupt_exception) 90 catch (octave_interrupt_exception)
91 { 91 {
92 // Swallow the interrupt. 92 // Swallow the interrupt.
93 warning ("onCleanup: interrupt occured in cleanup action"); 93 warning ("onCleanup: interrupt occured in cleanup action");
94 }
95 catch (std::bad_alloc)
96 {
97 // Swallow the exception.
98 warning ("onCleanup: out of memory occured in cleanup action");
99 } 94 }
100 catch (...) // Yes, the black hole. We're in a d-tor. 95 catch (...) // Yes, the black hole. We're in a d-tor.
101 { 96 {
102 // This shouldn't happen, in theory. 97 // This shouldn't happen, in theory.
103 error ("onCleanup: internal error: unhandled exception in cleanup action"); 98 error ("onCleanup: internal error: unhandled exception in cleanup action");