From: Daniel Arndt Date: Tue, 19 Feb 2019 18:26:55 +0000 (+0100) Subject: Provide step-61 with the usual exception catching harness X-Git-Tag: v9.1.0-rc1~333^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7735%2Fhead;p=dealii.git Provide step-61 with the usual exception catching harness --- diff --git a/examples/step-61/step-61.cc b/examples/step-61/step-61.cc index 13866adf30..d62b125a7b 100644 --- a/examples/step-61/step-61.cc +++ b/examples/step-61/step-61.cc @@ -912,9 +912,36 @@ void WGDarcyEquation::run() // This is the main function. We can change the dimension here to run in 3d. int main() { - deallog.depth_console(2); - WGDarcyEquation<2> WGDarcyEquationTest; - WGDarcyEquationTest.run(); + try + { + deallog.depth_console(2); + WGDarcyEquation<2> WGDarcyEquationTest; + WGDarcyEquationTest.run(); + } + catch (std::exception &exc) + { + std::cerr << std::endl + << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + } + catch (...) + { + std::cerr << std::endl + << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + throw; + } return 0; }