Merge pull request #5765 from atgeirr/refactor-errorguard-dump-downstream

Use formattedErrors() and simplify.
This commit is contained in:
Bård Skaflestad 2024-11-27 11:41:53 +01:00 committed by GitHub
commit 641f094309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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