catch all exceptions in all tutorials and examples

This commit is contained in:
Andreas Lauser 2013-09-02 17:35:33 +02:00
parent fde3fe3332
commit a224122d84

View File

@ -73,6 +73,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;
@ -209,3 +210,7 @@ main(int argc, char** argv)
} }
} }
} }
catch (const std::exception &e) {
std::cerr << "Program threw an exception: " << e.what() << "\n";
throw;
}