From: Wolfgang Bangerth Date: Fri, 27 Feb 2015 02:49:36 +0000 (-0600) Subject: Replace an exception without argument. X-Git-Tag: v8.3.0-rc1~411^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96e0ffbbd4556311ea680cb365f320e4af1df47b;p=dealii.git Replace an exception without argument. 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. --- diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 752215f3d2..be85a8fcb5 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -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,