]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve error message. 31/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 26 Jul 2014 10:48:05 +0000 (05:48 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 26 Jul 2014 10:48:05 +0000 (05:48 -0500)
This is in response to an email on the mailing list that showed an error message that wasn't particularly helpful.

include/deal.II/grid/grid_in.h
source/grid/grid_in.cc

index 2562f2870e2c00016353b0b4345a1722b5a6f072..6798155dc5cc8ed248460abcb5a51a721f80fa95 100644 (file)
@@ -510,8 +510,9 @@ public:
    */
   DeclException2 (ExcInvalidVertexIndex,
                   int, int,
-                  << "Trying to access invalid vertex index " << arg2
-                  << " while creating cell " << arg1);
+                  << "While creating cell " << arg1
+                  << ", you are referencing a vertex with index " << arg2
+                  << " but no vertex with this index has been described in the input file.");
   /**
    * Exception
    */
index 024a708b2e0fc97cdb4012a4d4968d963f4bef43..a7b9f7fb98f8772681d1c3b4fa404b499ed596ff 100644 (file)
@@ -659,9 +659,11 @@ void GridIn<dim, spacedim>::read_ucd (std::istream &in)
             else
               {
                 // no such vertex index
-                AssertThrow (false, ExcInvalidVertexIndex(cell, cells.back().vertices[i]));
+                AssertThrow (false,
+                             ExcInvalidVertexIndex(cell, cells.back().vertices[i]));
+
                 cells.back().vertices[i] = numbers::invalid_unsigned_int;
-              };
+              }
         }
       else if ((cell_type == "line") && ((dim == 2) || (dim == 3)))
         // boundary info

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.