diff --git a/dumux/material/constraintsolvers/misciblemultiphasecomposition.hh b/dumux/material/constraintsolvers/misciblemultiphasecomposition.hh index 9d8a129e6e41d4fa80859bc89444b687fdb72e32..9a23a0f5a50200fc99f443525e4560e8d49ce8aa 100644 --- a/dumux/material/constraintsolvers/misciblemultiphasecomposition.hh +++ b/dumux/material/constraintsolvers/misciblemultiphasecomposition.hh @@ -162,7 +162,19 @@ public: } // solve for all mole fractions - M.solve(x, b); + try + { + M.solve(x, b); + } + catch (Dune::FMatrixError & e) { + DUNE_THROW(NumericalProblem, + "Matrix for composition of phases could not be solved. \n" + "Throwing NumericalProblem for trying with smaller timestep."); + } + catch (...) { + std::cerr << "Unknown exception thrown!\n"; + exit(1); + } // set all mole fractions and the the additional quantities in // the fluid state