]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace an exception without argument.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 02:58:51 +0000 (20:58 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Feb 2015 02:58:51 +0000 (20:58 -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 d181fb213523e4a36f76e1b423df7c262c40ec3c..62398b0e9c2595ba125cf961cec8fa4dd96dfa2d 100644 (file)
@@ -931,11 +931,6 @@ namespace internal
                     << "Something went wrong when making cell " << arg1
                     << ". Read the docs and the source code "
                     << "for more information.");
-    /**
-     * Exception
-     * @ingroup Exceptions
-     */
-    DeclException0 (ExcGridHasInvalidVertices);
     /**
      * Exception
      * @ingroup Exceptions
@@ -1692,7 +1687,10 @@ namespace internal
           // exit with an exception
           AssertThrow (* (std::min_element(vertex_touch_count.begin(),
                                            vertex_touch_count.end())) >= 2,
-                       ExcGridHasInvalidVertices());
+                       ExcMessage("During creation of a triangulation, a part of the "
+                                  "algorithm encountered a vertex that is part of only "
+                                  "a single adjacent line. However, in 2d, every vertex "
+                                  "needs to be at least part of two lines."));
         }
 
         // reserve enough space
@@ -2009,7 +2007,10 @@ namespace internal
           // exit with an exception
           AssertThrow (* (std::min_element(vertex_touch_count.begin(),
                                            vertex_touch_count.end())) >= 3,
-                       ExcGridHasInvalidVertices());
+                       ExcGridHasInvalidVertices("During creation of a triangulation, a part of the "
+                                                 "algorithm encountered a vertex that is part of only "
+                                                 "one or two adjacent lines. However, in 3d, every vertex "
+                                                 "needs to be at least part of three lines."));
         }
 
 

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.