catch all exceptions in all tutorials and examples

This commit is contained in:
Andreas Lauser 2013-09-02 17:35:33 +02:00 committed by Atgeirr Flø Rasmussen
parent e8458e9a23
commit f0e86b98e3

View File

@ -71,6 +71,7 @@ namespace
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int int
main(int argc, char** argv) main(int argc, char** argv)
try
{ {
using namespace Opm; 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;
}