Use formattedErrors() and simplify.

No longer calling dump() means we avoid the extra dumping to stderr of
the warnings and errors.
This commit is contained in:
Atgeirr Flø Rasmussen 2024-11-27 08:52:05 +01:00
parent f11c511878
commit 0238f45339

View File

@ -617,10 +617,7 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
if (*errorGuard) { // errors encountered
parseSuccess = 0;
if (failureMessage.size()) {
failureMessage += std::string("\n");
}
failureMessage += errorGuard->dump();
failureMessage += errorGuard->formattedErrors();
errorGuard->clear();
}
@ -628,7 +625,7 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
if (! parseSuccess) {
if (comm.rank() == 0) {
OpmLog::error(fmt::format("Unrecoverable errors while loading input: {}", failureMessage));
OpmLog::error(fmt::format("Unrecoverable errors while loading input:\n{}", failureMessage));
}
#if HAVE_MPI