]> https://gitweb.dealii.org/ - dealii.git/commitdiff
More work to make exceptions more meaningful. 619/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 28 Feb 2015 02:14:43 +0000 (20:14 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 28 Feb 2015 02:14:43 +0000 (20:14 -0600)
source/grid/tria.cc

index fdb58da9412d4c910132ea0a3074d1b89784a8ac..a6f115f7a0bb93a30cf6515aebd2efdb7659fb8d 100644 (file)
@@ -8937,9 +8937,14 @@ copy_triangulation (const Triangulation<dim, spacedim> &old_tria)
           (levels.size () == 0) &&
           (faces == NULL),
           ExcTriangulationNotEmpty(vertices.size(), levels.size()));
-  Assert (old_tria.levels.size() != 0, ExcInternalError());
-  Assert (old_tria.vertices.size() != 0, ExcInternalError());
-  Assert (dim == 1 || old_tria.faces != NULL, ExcInternalError());
+  Assert ((old_tria.levels.size() != 0) &&
+          (old_tria.vertices.size() != 0) &&
+          (dim == 1 || old_tria.faces != NULL),
+          ExcMessage("When calling Triangulation::copy_triangulation(), "
+                     "the target triangulation must be empty but the source "
+                     "triangulation (the argument to this function) must contain "
+                     "something. Here, it seems like the source does not "
+                     "contain anything at all."));
 
 
   // copy normal elements

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.