From: bangerth Date: Fri, 9 Sep 2011 03:20:13 +0000 (+0000) Subject: Use the main() function used by step-6 and forward, rather than the old and X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9d881f4cf087cb1d95a02e77c1fa47b94cfbd0f;p=dealii-svn.git 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 --- 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; }