reporting: on error reading user options, print actual option passed not lowercase version of it
parent
d6210a4a34
commit
cbd43ee9df
|
@ -77,13 +77,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@graph.graph: %s is not a recognized option.', field);
|
||||
error('@graph.graph: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,13 +52,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@page.page: %s is not a recognized option.', field);
|
||||
error('@page.page: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,14 +58,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@report.report: %s is not a recognized option.', ...
|
||||
field);
|
||||
error('@report.report: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,14 +40,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@section.section: %s is not a recognized option.', ...
|
||||
field);
|
||||
error('@section.section: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -65,13 +65,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@series.series: %s is not a recognized option.', field);
|
||||
error('@series.series: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -62,14 +62,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('%s is not a recognized option to the Table constructor.', ...
|
||||
field);
|
||||
error('%s is not a recognized option to the Table constructor.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,13 +48,12 @@ elseif nargin > 1
|
|||
|
||||
% overwrite default values
|
||||
for pair = reshape(varargin, 2, [])
|
||||
field = lower(pair{1});
|
||||
ind = strmatch(field, lower(optNames), 'exact');
|
||||
ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
|
||||
assert(isempty(ind) || length(ind) == 1);
|
||||
if ~isempty(ind)
|
||||
o.(optNames{ind}) = pair{2};
|
||||
else
|
||||
error('@vspace.vspace: %s is not a recognized option.', field);
|
||||
error('@vspace.vspace: %s is not a recognized option.', pair{1});
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue