Using std::exception

This commit is contained in:
Vegard Kippe 2023-11-30 16:13:40 +01:00
parent 2294983759
commit 0acb148ba7

View File

@ -586,7 +586,7 @@ namespace Opm {
try {
well->wellTesting(ebosSimulator_, simulationTime, this->wellState(), this->groupState(), wellTestState(), deferred_logger);
} catch (std::runtime_error& e) {
} catch (std::exception& e) {
const std::string msg = fmt::format("Exception during testing of well: {}. The well will not open.\n Exception message: {}", wellEcl.name(), e.what());
deferred_logger.warning("WELL_TESTING_FAILED", msg);
}