From a9d881f4cf087cb1d95a02e77c1fa47b94cfbd0f Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 9 Sep 2011 03:20:13 +0000 Subject: [PATCH] Use the main() function used by step-6 and forward, rather than the old and unsafe one from step-4. git-svn-id: https://svn.dealii.org/trunk@24292 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-26/step-26.cc | 39 +++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/deal.II/examples/step-26/step-26.cc b/deal.II/examples/step-26/step-26.cc index aca2b5c47a..6124d3d052 100644 --- a/deal.II/examples/step-26/step-26.cc +++ b/deal.II/examples/step-26/step-26.cc @@ -768,15 +768,40 @@ namespace Step26 // library. int main () { - using namespace dealii; - using namespace Step26; + try + { + using namespace dealii; + using namespace Step26; - deallog.depth_console (0); + deallog.depth_console (0); - { - LaplaceProblem<3> laplace_problem_3d; - laplace_problem_3d.run (); - } + LaplaceProblem<3> laplace_problem_3d; + laplace_problem_3d.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; + + return 1; + } + catch (...) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + } return 0; } -- 2.39.5