catch all exceptions in all tutorials and examples

This commit is contained in:
Andreas Lauser
2013-09-02 17:35:33 +02:00
parent c4c771e39b
commit 5d435d396c
10 changed files with 51 additions and 2 deletions

View File

@@ -92,6 +92,7 @@ namespace
// ----------------- Main program -----------------
int
main(int argc, char** argv)
try
{
using namespace Opm;
@@ -297,3 +298,7 @@ main(int argc, char** argv)
<< "\n Pressure time: " << ptime
<< "\n Transport time: " << ttime << std::endl;
}
catch (const std::exception &e) {
std::cerr << "Program threw an exception: " << e.what() << "\n";
throw;
}