From 96df3b0043c8fe7e283ea0a431ce57cbb41cbd5b Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Mon, 22 Sep 2014 20:17:20 +0200 Subject: [PATCH] Cosmetic changes to error messages (cherry picked from commit ffa424d9d88dcd534272b154a3d9848df861914b) --- matlab/utilities/dataset/makedataset.m | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/matlab/utilities/dataset/makedataset.m b/matlab/utilities/dataset/makedataset.m index d619d46e5..d026a5d3e 100644 --- a/matlab/utilities/dataset/makedataset.m +++ b/matlab/utilities/dataset/makedataset.m @@ -62,9 +62,9 @@ elseif ~isempty(DynareOptions.datafile) && isempty(DynareOptions.dataset.file) datafile = DynareOptions.datafile; newdatainterface = 0; elseif isempty(DynareOptions.datafile) && ~isempty(DynareOptions.dataset.file) - error('You cannot use simultaneously the data command and the datafile option (in the estimation command)!') + error('makedataset: You cannot simultaneously use the data command and the datafile option (in the estimation command)!') else - error('You have to specify the datafile!') + error('makedataset: You have to specify the datafile!') end % Check extension. @@ -80,12 +80,12 @@ if ~isempty(datafile) end end if isempty(available_extensions) - error(['I can''t find a datafile (with allowed extension)!']) + error(['makedataset: I can''t find a datafile (with allowed extension m, mat, csv, xls or xlsx)!']) end if length(available_extensions)>1 - error(sprintf(['You did not specify an extension for the datafile, but more than one candidate ' ... - 'are available in the designed folder!\nPlease, add an extension to the datafile ' ... - '(m, mat, csv, xls or xlsx are legal extensions).'])); + error(sprintf(['makedataset: You did not specify an extension for the datafile, but more than one candidate ' ... + 'is available in the designated folder!\nPlease, add an extension to the datafile ' ... + '(m, mat, csv, xls or xlsx are permitted extensions).'])); end datafile = [datafile '.' available_extensions{1}]; end @@ -136,7 +136,7 @@ end if ~set_time_default_initial_period && ~dataset_default_initial_period % Check if dataset.init and options_.initial_period are identical. if DynareOptions.initial_periodDynareDataset.dates(end) - error(sprintf('last_obs (%s) cannot be greater than the last date in the dataset (%s)!',char(lastobs),char(DynareDataset.dates(end)))) + error(sprintf('makedataset: last_obs (%s) cannot be greater than the last date in the dataset (%s)!',char(lastobs),char(DynareDataset.dates(end)))) end else % ... or check that nobs is smaller than the number of observations in DynareDataset. if nobs>DynareDataset.nobs - error(sprintf('nobs (%s) cannot be greater than the last date in the dataset (%s)!', num2str(nobs), num2str(nobs))) + error(sprintf('makedataset: nobs (%s) cannot be greater than the last date in the dataset (%s)!', num2str(nobs), num2str(DynareDataset.nobs))) end end