# HG changeset patch # User jwe # Date 1175700698 0 # Node ID ef5113474882a5f186d8d73a018fc9644861c37b # Parent e978a9233cf64c0252d72be17aaa3eb72c46ca33 [project @ 2007-04-04 15:31:37 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-04-04 John W. Eaton + + * octave.cc (execute_eval_option_code): Catch bad::alloc here. + 2007-04-03 John W. Eaton * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): diff --git a/src/octave.cc b/src/octave.cc --- 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");