]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use the main() function used by step-6 and forward, rather than the old and
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Sep 2011 03:20:13 +0000 (03:20 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Sep 2011 03:20:13 +0000 (03:20 +0000)
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

index aca2b5c47a60041a548eecb2a417c42043ce16c8..6124d3d05270d05454d21ff084245678cc423329 100644 (file)
@@ -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;
 }

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.