]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide error texts to more exceptions. 3103/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 12 Sep 2016 11:13:33 +0000 (05:13 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 12 Sep 2016 11:13:33 +0000 (05:13 -0600)
Also remove one exception for which an equally named exception is
already available and for wihch I'm providing an error text as part of
this patch.

include/deal.II/base/data_out_base.h
source/base/data_out_base.cc

index bbc88554a5a980010ce99a0063f03953cb70371c..38725b00402abfe994769405a852fe5c99946630 100644 (file)
@@ -1861,11 +1861,17 @@ namespace DataOutBase
   /**
    * An output function did not receive any patches for writing.
    */
-  DeclException0 (ExcNoPatches);
+  DeclExceptionMsg (ExcNoPatches,
+                    "You are trying to write graphical data into a file, but "
+                    "no data is available in the intermediate format that "
+                    "the DataOutBase functions require. Did you forget to "
+                    "call a function such as DataOut::build_patches()?");
   /**
    * Exception
    */
-  DeclException0 (ExcTecplotAPIError);
+  DeclExceptionMsg (ExcTecplotAPIError,
+                    "The error code of one of the Tecplot functions was "
+                    "not zero as expected.");
   /**
    * Exception
    */
@@ -2644,10 +2650,6 @@ public:
    */
   void merge (const DataOutReader<dim,spacedim> &other);
 
-  /**
-   * Exception
-   */
-  DeclException0 (ExcNoPatches);
   /**
    * Exception
    */
index 031e4075ac19dcd77ddfe56d4c4d6b2c402cc8fa..072c99bd608fcdcff9b2af5eee35f526a13341e0 100644 (file)
@@ -7420,8 +7420,8 @@ merge (const DataOutReader<dim,spacedim> &source)
 
 
   const std::vector<Patch> source_patches = source.get_patches ();
-  Assert (patches.size () != 0,        ExcNoPatches ());
-  Assert (source_patches.size () != 0, ExcNoPatches ());
+  Assert (patches.size () != 0,        DataOutBase::ExcNoPatches ());
+  Assert (source_patches.size () != 0, DataOutBase::ExcNoPatches ());
   // check equality of component
   // names
   Assert (get_dataset_names() == source.get_dataset_names(),

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.