Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
cbd43ee9
Commit
cbd43ee9
authored
May 14, 2013
by
Houtan Bastani
Browse files
reporting: on error reading user options, print actual option passed not lowercase version of it
parent
d6210a4a
Changes
7
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@graph/graph.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@page/page.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@report/report.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@section/section.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@series/series.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@table/table.m
View file @
cbd43ee9
...
...
@@ -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
...
...
matlab/reports/@vspace/vspace.m
View file @
cbd43ee9
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment