]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace an exception without argument.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 02:49:36 +0000 (20:49 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 02:49:36 +0000 (20:49 -0600)
In this case, the exception is really an internal error that indicates an inconsistent state of our data structures. There isn't really a good reason to not use ExcMessage with some descriptive text.

source/grid/tria.cc

index 752215f3d2774eeaeaf4b1e1d443dfecc8757df9..be85a8fcb523374f2a48acc14a6bf50b05c3b4b9 100644 (file)
@@ -922,11 +922,6 @@ namespace internal
     // internal::Triangulation
     using dealii::Triangulation;
 
-    /**
-     *  Exception
-     * @ingroup Exceptions
-     */
-    DeclException0 (ExcTooFewVerticesAllocated);
     /**
      *  Exception
      * @ingroup Exceptions
@@ -3721,7 +3716,7 @@ namespace internal
             while (triangulation.vertices_used[next_unused_vertex] == true)
               ++next_unused_vertex;
             Assert (next_unused_vertex < triangulation.vertices.size(),
-                    ExcTooFewVerticesAllocated());
+                    ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
             triangulation.vertices_used[next_unused_vertex] = true;
 
             new_vertices[8] = next_unused_vertex;
@@ -4177,7 +4172,7 @@ namespace internal
                   while (triangulation.vertices_used[next_unused_vertex] == true)
                     ++next_unused_vertex;
                   Assert (next_unused_vertex < triangulation.vertices.size(),
-                          ExcTooFewVerticesAllocated());
+                          ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
 
                   // Now we always ask the cell itself where to put
                   // the new point. The cell in turn will query the
@@ -4507,7 +4502,7 @@ namespace internal
                   while (triangulation.vertices_used[next_unused_vertex] == true)
                     ++next_unused_vertex;
                   Assert (next_unused_vertex < triangulation.vertices.size(),
-                          ExcTooFewVerticesAllocated());
+                          ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
                   triangulation.vertices_used[next_unused_vertex] = true;
 
                   if (spacedim == dim)
@@ -4972,7 +4967,7 @@ namespace internal
                   while (triangulation.vertices_used[next_unused_vertex] == true)
                     ++next_unused_vertex;
                   Assert (next_unused_vertex < triangulation.vertices.size(),
-                          ExcTooFewVerticesAllocated());
+                          ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
                   triangulation.vertices_used[next_unused_vertex] = true;
 
                   triangulation.vertices[next_unused_vertex]
@@ -5474,7 +5469,7 @@ namespace internal
                     while (triangulation.vertices_used[next_unused_vertex] == true)
                       ++next_unused_vertex;
                     Assert (next_unused_vertex < triangulation.vertices.size(),
-                            ExcTooFewVerticesAllocated());
+                            ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
 
                     // now: if the quad is refined anisotropically
                     // already, set the anisotropic refinement flag
@@ -7692,7 +7687,7 @@ namespace internal
                       while (triangulation.vertices_used[next_unused_vertex] == true)
                         ++next_unused_vertex;
                       Assert (next_unused_vertex < triangulation.vertices.size(),
-                              ExcTooFewVerticesAllocated());
+                              ExcMessage("Internal error: During refinement, the triangulation wants to access an element of the 'vertices' array but it turns out that the array is not large enough."));
                       triangulation.vertices_used[next_unused_vertex] = true;
 
                       // the new vertex is definitely in the interior,

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.