Mercurial > octave-antonio
changeset 16003:3b3321f9db9f
arrayfun: adding IDs to error messages in accordance with error_ids.
author | Juan Pablo Carbajal <ajuanpi+dev@gmail.com> |
---|---|
date | Tue, 05 Feb 2013 10:55:45 +0100 |
parents | d53fa7e43aa9 |
children | 1045790f9be4 |
files | libinterp/corefcn/cellfun.cc |
diffstat | 1 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc Mon Feb 04 23:53:51 2013 +0000 +++ b/libinterp/corefcn/cellfun.cc Tue Feb 05 10:55:45 2013 +0100 @@ -1133,7 +1133,8 @@ if (nargin < 2) { - error ("arrayfun: function requires at least 2 arguments"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: function requires at least 2 arguments"); print_usage (); return retval; } @@ -1164,7 +1165,8 @@ func = symbol_table::find_function (name); if (func.is_undefined ()) - error ("arrayfun: invalid function NAME: %s", name.c_str ()); + error_with_id ("Octave:invalid-input-arg", + "arrayfun: invalid function NAME: %s", name.c_str ()); symbol_table_lookup = true; } @@ -1242,7 +1244,8 @@ { if (mask[i] && inputs[i].dims () != fdims) { - error ("arrayfun: dimensions mismatch"); + error_with_id ("Octave:invalid-input-arg", + "arrayfun: dimensions mismatch"); return retval; } } @@ -1289,7 +1292,8 @@ if (nargout > 0 && tmp.length () < nargout) { - error ("arrayfun: function returned fewer than nargout values"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: function returned fewer than nargout values"); return retval; } @@ -1314,7 +1318,8 @@ retv[j] = val.resize (fdims); else { - error ("arrayfun: all values must be scalars when UniformOutput = true"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: all values must be scalars when UniformOutput = true"); break; } } @@ -1341,7 +1346,8 @@ } else { - error ("arrayfun: all values must be scalars when UniformOutput = true"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: all values must be scalars when UniformOutput = true"); break; } } @@ -1399,7 +1405,8 @@ if (nargout > 0 && tmp.length () < nargout) { - error ("arrayfun: function returned fewer than nargout values"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: function returned fewer than nargout values"); return retval; } @@ -1430,7 +1437,8 @@ } } else - error ("arrayfun: argument NAME must be a string or function handle"); + error_with_id ("Octave:invalid-fun-call", + "arrayfun: argument NAME must be a string or function handle"); return retval; }