]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Catch the exception that is presently thrown to reduce the amount of
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 25 Apr 2006 15:08:07 +0000 (15:08 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 25 Apr 2006 15:08:07 +0000 (15:08 +0000)
output. The result is still not correct, though.

git-svn-id: https://svn.dealii.org/trunk@12883 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/find_cell_4.cc

index a5eac19e884e6cf38f821d5e1a85b0334d96be12..81fd2a16308483986a5d0bf4da8bfa0eaffec18b 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  find_cell_1.cc  ---------------------------
+//----------------------------  find_cell_4.cc  ---------------------------
 //    $Id$
 //    Version: $Name$ 
 //
@@ -9,7 +9,7 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  find_cell_1.cc  ---------------------------
+//----------------------------  find_cell_4.cc  ---------------------------
 
 
 // take a 3d mesh and check that we can find an arbitrary point's cell
@@ -48,15 +48,23 @@ void check (Triangulation<3> &tria)
 
 int main () 
 {
-  std::ofstream logfile("find_cell_1/output");
+  std::ofstream logfile("find_cell_4/output");
   deallog.attach(logfile);
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  Triangulation<3> coarse_grid;
-  GridGenerator::hyper_cube (coarse_grid);
-  coarse_grid.refine_global (3);
-  check (coarse_grid);
+  try
+    {
+      Triangulation<3> coarse_grid;
+      GridGenerator::hyper_cube (coarse_grid);
+      coarse_grid.refine_global (3);
+      check (coarse_grid);
+    }
+  catch (...)
+    {
+                                      // we shouldn't get here...
+      deallog << "Caught an error..." << std::endl;
+    }
 }
 
   

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.