From: Wolfgang Bangerth Date: Sat, 28 Feb 2015 02:14:43 +0000 (-0600) Subject: More work to make exceptions more meaningful. X-Git-Tag: v8.3.0-rc1~404^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F619%2Fhead;p=dealii.git More work to make exceptions more meaningful. --- 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