Skip to content

Commit

Permalink
[base] Clarify exception for CSV SolutionArray::restore
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Jun 22, 2023
1 parent f832c7e commit 222935c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/base/SolutionArray.cpp
Expand Up @@ -1367,6 +1367,11 @@ AnyMap SolutionArray::restore(const string& fname,
size_t dot = fname.find_last_of(".");
string extension = (dot != npos) ? toLowerCopy(fname.substr(dot + 1)) : "";
AnyMap header;
if (extension == "csv") {
throw NotImplementedError("SolutionArray::restore",
"CSV import not implemented; if using Python, data can be imported via "
"'read_csv' instead.");
}
if (extension == "h5" || extension == "hdf" || extension == "hdf5") {
readEntry(fname, id, sub);
header = readHeader(fname, id);
Expand Down

0 comments on commit 222935c

Please sign in to comment.