Mercurial > octave
diff libinterp/octave.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 | 2d337a9869e9 |
children | ad1a980b0cb5 |
line wrap: on
line diff
--- a/libinterp/octave.cc Tue Aug 28 09:42:48 2012 -0400 +++ b/libinterp/octave.cc Tue Aug 28 11:00:53 2012 -0400 @@ -379,14 +379,6 @@ recover_from_exception (); gripe_safe_source_exception (file_name, "unhandled execution exception"); } - catch (std::bad_alloc) - { - recover_from_exception (); - error_state = -2; - gripe_safe_source_exception - (file_name, - "memory exhausted or requested size too large for range of Octave's index type"); - } } // Initialize by reading startup files. @@ -507,12 +499,6 @@ std::cerr << "error: unhandled execution exception -- eval failed" << std::endl; } - catch (std::bad_alloc) - { - error_state = -2; - std::cerr << "error: memory exhausted or requested size too large for range of Octave's index type -- eval failed" - << std::endl; - } return parse_status; }