diff --git a/examples/sim_2p_incomp.cpp b/examples/sim_2p_incomp.cpp index ea9d11fb8..687910921 100644 --- a/examples/sim_2p_incomp.cpp +++ b/examples/sim_2p_incomp.cpp @@ -71,6 +71,7 @@ namespace // ----------------- Main program ----------------- int main(int argc, char** argv) +try { using namespace Opm; @@ -300,3 +301,7 @@ main(int argc, char** argv) } } +catch (const std::exception &e) { + std::cerr << "Program threw an exception: " << e.what() << "\n"; + throw; +}