Mercurial > hg > octave-shane
changeset 6487:ef5113474882
[project @ 2007-04-04 15:31:37 by jwe]
author | jwe |
---|---|
date | Wed, 04 Apr 2007 15:31:38 +0000 |
parents | e978a9233cf6 |
children | a3152d296248 |
files | src/ChangeLog src/octave.cc |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-04-04 John W. Eaton <jwe@octave.org> + + * octave.cc (execute_eval_option_code): Catch bad::alloc here. + 2007-04-03 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread):
--- a/src/octave.cc +++ b/src/octave.cc @@ -372,7 +372,14 @@ int parse_status = 0; - eval_string (code, false, parse_status, 0); + try + { + eval_string (code, false, parse_status, 0); + } + catch (std::bad_alloc) + { + std::cerr << "error: memory exhausted -- eval failed\n"; + } unwind_protect::run_frame ("execute_eval_option_code");