]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use step-6 style main() function.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 Dec 2010 04:55:47 +0000 (04:55 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 Dec 2010 04:55:47 +0000 (04:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@23089 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-38/step-38.cc

index 8cc31786f2a592ddad83a219e82fa769848b1d2c..3a9066a0f9abf779a5d79183e8ed54c4d17d40ab 100644 (file)
@@ -396,19 +396,38 @@ void LaplaceBeltramiProblem<spacedim>::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;
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.