Skip to content

Commit

Permalink
Per #1429, I realize that the line number actually is readily availab…
Browse files Browse the repository at this point in the history
…le in the DataLine class... so include it in the error message.
  • Loading branch information
JohnHalleyGotway committed Feb 26, 2021
1 parent 9b0154e commit 22f3f24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions met/src/basic/vx_util/data_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,12 @@ const char * DataLine::get_item(int k) const

if ( (k < 0) || (k >= N_items) ) {

ConcatString filename = (get_file() ? get_file()->filename() : "");
ConcatString cs = (File ? File->filename() : "");

mlog << Error << "\nDataLine::get_item(int) -> "
<< "range check error while reading item number " << k+1
<< " from file \"" << filename << "\"\n\n";
<< "range check error reading line number " << LineNumber
<< ", item number " << k+1 << " of " << N_items
<< " from file \"" << cs << "\"\n\n";

exit ( 1 );

Expand Down

0 comments on commit 22f3f24

Please sign in to comment.