Commit d4d9e4b0 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

parse arguments again gives an error on unknown arguments

these arguments are most likely typos

if two output variables are devined, unknown arguments are still returned as the second one
parent f95c0917
......@@ -5,6 +5,8 @@ function varargout = ita_parse_arguments(varargin)
%
% Syntax: sOut = ita_parse_arguments(sIn, argumentcell)
% Syntax: sOut = ita_parse_arguments(sIn, varargin)
% Syntax: [sOut,notFound] = ita_parse_arguments(sIn, varargin)
% Returns arguments that are not found in the struct
% Syntax: sOut = ita_parse_arguments(sIn, varargin, startidx) - start at
% this index to parse varargin
% Syntax: sOut = ita_parse_arguments(sIn) - Only checking default settings
......@@ -301,7 +303,7 @@ end
if notFoundArguments == 1
if nargout < 2
ita_verbose_info([thisFuncStr callFuncStr 'Some arguments could not be found in the struct. They are returned separately.'],0);
error([thisFuncStr callFuncStr 'Some arguments could not be found in the struct.'],0);
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment