From: bangerth Date: Fri, 31 Dec 2010 04:55:47 +0000 (+0000) Subject: Use step-6 style main() function. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9d5bf0678517b9d99ac1d4d95b827baca86c44;p=dealii-svn.git Use step-6 style main() function. git-svn-id: https://svn.dealii.org/trunk@23089 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-38/step-38.cc b/deal.II/examples/step-38/step-38.cc index 8cc31786f2..3a9066a0f9 100644 --- a/deal.II/examples/step-38/step-38.cc +++ b/deal.II/examples/step-38/step-38.cc @@ -396,19 +396,38 @@ void LaplaceBeltramiProblem::run () -int main ( int argc, char **argv ) +int main () { - deallog.depth_console (0); - - { - LaplaceBeltramiProblem<3> laplace_beltrami_3d; - laplace_beltrami_3d.run(); - } - - { - LaplaceBeltramiProblem<2> laplace_beltrami_2d; - laplace_beltrami_2d.run(); - } + try + { + deallog.depth_console (0); + + LaplaceBeltramiProblem<3> laplace_beltrami; + laplace_beltrami.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; }