From 506135df402d9fdc38e1e5a8b383de325ce6bab0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 27 Feb 2015 20:14:43 -0600 Subject: [PATCH] More work to make exceptions more meaningful. --- source/grid/tria.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index fdb58da941..a6f115f7a0 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -8937,9 +8937,14 @@ copy_triangulation (const Triangulation &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 -- 2.39.5