mirror of
https://github.com/OPM/opm-upscaling.git
synced 2026-08-27 05:27:10 -05:00
Add exception handlers to all tutorials and examples
This commit is contained in:
@@ -54,6 +54,7 @@ typedef SimulatorTraits<Isotropic, Implicit> SimTraits;
|
||||
typedef SimulatorTesterFlexibleBC<SimTraits> Simulator;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
try
|
||||
{
|
||||
Opm::parameter::ParameterGroup param(argc, argv);
|
||||
Dune::MPIHelper::instance(argc,argv);
|
||||
@@ -61,4 +62,9 @@ int main(int argc, char** argv)
|
||||
sim.init(param);
|
||||
sim.run();
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user