catch all exceptions in all tutorials and examples

This commit is contained in:
Andreas Lauser
2013-09-02 17:35:33 +02:00
parent 1605b88d66
commit 4e96915af1

View File

@@ -70,6 +70,7 @@ namespace
// ----------------- Main program -----------------
int
main(int argc, char** argv)
try
{
using namespace Opm;
@@ -282,3 +283,7 @@ main(int argc, char** argv)
}
}
catch (const std::exception &e) {
std::cerr << "Program threw an exception: " << e.what() << "\n";
throw;
}