From a224122d840347543afae044446bdd394efcc6d3 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 2 Sep 2013 17:35:33 +0200 Subject: [PATCH] catch all exceptions in all tutorials and examples --- examples/compute_tof_from_files.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/compute_tof_from_files.cpp b/examples/compute_tof_from_files.cpp index bc4398d8b..297871390 100644 --- a/examples/compute_tof_from_files.cpp +++ b/examples/compute_tof_from_files.cpp @@ -73,6 +73,7 @@ namespace // ----------------- Main program ----------------- int main(int argc, char** argv) +try { 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; +}