(re)throw EOF exception when next_dvector() has not yet read any items

This commit is contained in:
Axel Kohlmeyer
2023-12-16 17:07:37 -05:00
parent df7f3b8dea
commit e100a42087
2 changed files with 5 additions and 2 deletions

View File

@ -144,6 +144,8 @@ void PotentialFileReader::next_dvector(double *list, int n)
{
try {
return reader->next_dvector(list, n);
} catch (EOFException &) {
throw EOFException("EOF reached");
} catch (FileReaderException &e) {
error->one(FLERR, e.what());
}