Mercurial > hg > octave-lojdl
changeset 8033:2ad5ba320b93
parse.y (Feval): Return value produced by evaluating CATCH string
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Aug 2008 13:47:03 -0400 |
parents | 2fd4a5ef6b59 |
children | f61bd8e0d682 |
files | src/ChangeLog src/parse.y |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-08-19 John W. Eaton <jwe@octave.org> + + * parse.y (Feval): Return value produced by evaluating CATCH string. + 2008-08-12 John W. Eaton <jwe@octave.org> * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
--- a/src/parse.y +++ b/src/parse.y @@ -3852,9 +3852,6 @@ octave_value_list tmp = eval_string (args(0), nargout > 0, parse_status, nargout); - if (nargout > 0) - retval = tmp; - if (nargin > 1 && (parse_status != 0 || error_state)) { error_state = 0; @@ -3864,10 +3861,13 @@ buffer_error_messages--; - eval_string (args(1), 0, parse_status, nargout); - - retval = octave_value_list (); + tmp = eval_string (args(1), nargout > 0, parse_status, nargout); + + if (nargout > 0) + retval = tmp; } + else if (nargout > 0) + retval = tmp; unwind_protect::run_frame ("Feval"); }