WSL/SLF GitLab Repository

Commit 6b700aa7 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Another tiny fix related to end of lines: if too many "empty" lines are found,...

Another tiny fix related to end of lines: if too many "empty" lines are found, this could be a problem with EOL encoding. This now throws an exception (after 1000 empty lines).
parent 82eed9fb
......@@ -167,6 +167,7 @@ void ARCIO::read2DGrid_internal(Grid2DObject& grid_out, const std::string& full_
if (line.empty()) { //so we can tolerate empty lines
kk++; //to keep the same kk at the next iteration
nr_empty++;
if (nr_empty>1000) throw InvalidFormatException("Too many empty lines, most probably the file format is wrong (check the end-of-lines character!)", AT);
continue;
}
std::istringstream iss(line);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment