Merge pull request #1933 from joakim-hove/throw-same
Rethrow the same exception
This commit is contained in:
commit
ac40c65f64
@ -928,11 +928,9 @@ bool parseState( ParserState& parserState, const Parser& parser ) {
|
||||
we should not be tempted to continue the parsing.
|
||||
*/
|
||||
const auto& location = rawKeyword->location();
|
||||
std::string msg = "\nFailed to parse keyword: " + rawKeyword->getKeywordName() + "\n" +
|
||||
"In file " + location.filename + ", line " + std::to_string(location.lineno) + "\n\n" +
|
||||
"Error message: " + exc.what() + "\n";
|
||||
|
||||
throw std::invalid_argument(msg);
|
||||
std::string msg = Log::fileMessage(location, "Parse error: " + std::string{ exc.what() });
|
||||
OpmLog::error(msg);
|
||||
throw;
|
||||
}
|
||||
} else {
|
||||
const std::string msg = "The keyword " + rawKeyword->getKeywordName() + " is not recognized - ignored";
|
||||
|
Loading…
Reference in New Issue
Block a user