mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-07-07 04:53:03 -05:00
Merge pull request #5032 from vkip/catch_welltesting
Catch exceptions from well testing
This commit is contained in:
commit
b7ad5a9d29
|
@ -584,7 +584,12 @@ namespace Opm {
|
|||
well->setPrevSurfaceRates(this->wellState(), this->prevWellState());
|
||||
}
|
||||
|
||||
well->wellTesting(ebosSimulator_, simulationTime, this->wellState(), this->groupState(), wellTestState(), deferred_logger);
|
||||
try {
|
||||
well->wellTesting(ebosSimulator_, simulationTime, this->wellState(), this->groupState(), wellTestState(), deferred_logger);
|
||||
} catch (const 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user