diff --git a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp index 3b6bac86e..0d330dc7c 100644 --- a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp @@ -76,10 +76,14 @@ namespace Opm { std::cout << "Overall linear iterations used: " << linearIterations << std::endl; } } - catch (Opm::NumericalProblem) - { + catch (Opm::NumericalProblem e) { + std::cerr << e.what() << std::endl; // since linearIterations is < 0 this will restart the solver } + catch (std::runtime_error e) { + std::cerr << e.what() << std::endl; + // also catch linear solver not converged + } // (linearIterations < 0 means on convergence in solver) if( linearIterations >= 0 )