diff --git a/src/plasp/sas/Description.cpp b/src/plasp/sas/Description.cpp index bf24cfc..df5b774 100644 --- a/src/plasp/sas/Description.cpp +++ b/src/plasp/sas/Description.cpp @@ -182,7 +182,15 @@ void Description::parseSectionIdentifier(std::istream &istream, const std::strin size_t Description::parseNumber(std::istream &istream) const { auto number = std::numeric_limits::max(); - istream >> number; + + try + { + istream >> number; + } + catch (const std::exception &e) + { + throw ParserException("Could not parse number"); + } if (number == std::numeric_limits::max()) throw ParserException("Invalid number");