From 96e0ffbbd4556311ea680cb365f320e4af1df47b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 26 Feb 2015 20:49:36 -0600 Subject: [PATCH] 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. --- source/grid/tria.cc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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, -- 2.39.5