From edfe2e267e974999d119aaf4a83f36a1b5a1871f Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 3 Nov 2021 15:36:02 -0600 Subject: [PATCH 1/2] Per #1957, small change adding of the return status from the call to file_handler->readAsciiFiles(). Error out if bad status is returned. --- met/src/tools/other/ascii2nc/ascii2nc.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/met/src/tools/other/ascii2nc/ascii2nc.cc b/met/src/tools/other/ascii2nc/ascii2nc.cc index a8f74f9daf..b8379aa0d6 100644 --- a/met/src/tools/other/ascii2nc/ascii2nc.cc +++ b/met/src/tools/other/ascii2nc/ascii2nc.cc @@ -9,7 +9,7 @@ //////////////////////////////////////////////////////////////////////// // // Filename: ascii2nc.cc -// +//2 // Description: // Parse ASCII observations and convert them to NetCDF. // @@ -116,7 +116,7 @@ static ASCIIFormat ascii_format = ASCIIFormat_None; //////////////////////////////////////////////////////////////////////// // Variables for command line arguments -static vector< ConcatString > asfile_list; +static vector asfile_list; static ConcatString ncfile; static ConcatString config_filename(replace_path(DEFAULT_CONFIG_FILENAME)); @@ -234,10 +234,13 @@ int main(int argc, char *argv[]) { file_handler->setMessageTypeMap(config_info.getMessageTypeMap()); // - // Process the files. If a configuration file was specified, do any - // extra processing specified. + // Read the input files // - file_handler->readAsciiFiles(asfile_list); + if(!file_handler->readAsciiFiles(asfile_list)) { + mlog << Error << "\n" << program_name << "-> " + << "encountered an error while reading input files!\n\n"; + exit(1); + } // // Summarize the observations, if directed. We need to use a different From b6aa92b4b4336ba55a3ce54bbc5350545bd93a44 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 3 Nov 2021 16:12:45 -0600 Subject: [PATCH 2/2] Per #1957, remove spurious typo in comment. --- met/src/tools/other/ascii2nc/ascii2nc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/tools/other/ascii2nc/ascii2nc.cc b/met/src/tools/other/ascii2nc/ascii2nc.cc index b8379aa0d6..4d876793b8 100644 --- a/met/src/tools/other/ascii2nc/ascii2nc.cc +++ b/met/src/tools/other/ascii2nc/ascii2nc.cc @@ -9,7 +9,7 @@ //////////////////////////////////////////////////////////////////////// // // Filename: ascii2nc.cc -//2 +// // Description: // Parse ASCII observations and convert them to NetCDF. //