Mercurial > octave
changeset 30635:064a8fbf9162 stable
Assign error ID when parser fails because of incorrect number of function inputs/outputs (bug #61789)
* pt-eval.cc (execute_user_function): Call error_with_id() and ID of
"Octave:invalid-fun-call" instead of just error().
author | Rik <rik@octave.org> |
---|---|
date | Tue, 11 Jan 2022 12:43:53 -0800 |
parents | 754ad6e9c0a5 |
children | ad8c9d93b86d 3c4e851e0220 |
files | libinterp/parse-tree/pt-eval.cc |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Tue Jan 11 20:58:29 2022 +0100 +++ b/libinterp/parse-tree/pt-eval.cc Tue Jan 11 12:43:53 2022 -0800 @@ -3418,7 +3418,9 @@ { std::string name = user_function.name (); - error ("%s: function called with too many inputs", name.c_str ()); + error_with_id ("Octave:invalid-fun-call", + "%s: function called with too many inputs", + name.c_str ()); } define_parameter_list_from_arg_vector (param_list, args); @@ -3433,7 +3435,9 @@ { std::string name = user_function.name (); - error ("%s: function called with too many outputs", name.c_str ()); + error_with_id ("Octave:invalid-fun-call", + "%s: function called with too many outputs", + name.c_str ()); } }