]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Adjust error messages in the TimeDependent class and friends.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 15 Mar 2015 06:48:11 +0000 (01:48 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 17 Mar 2015 23:27:46 +0000 (18:27 -0500)
include/deal.II/numerics/time_dependent.h
source/numerics/time_dependent.cc

index dd8dc295988c068db689b821b455a1d62df9b3c6..bf56248fa77b5650521d0188a744472f096f7c49 100644 (file)
@@ -579,7 +579,8 @@ public:
   /**
    * Exception.
    */
-  DeclException0 (ExcInvalidPosition);
+  DeclExceptionMsg (ExcInvalidPosition,
+                    "You cannot insert a time step at the specified position.");
 
 protected:
   /**
@@ -802,11 +803,6 @@ public:
    */
   virtual std::size_t memory_consumption () const;
 
-  /**
-   * Exception
-   */
-  DeclException0 (ExcCantComputeTimestep);
-
 protected:
   /**
    * Pointer to the previous time step object in the list.
@@ -960,13 +956,6 @@ namespace TimeStepBase_Tria_Flags
      * to * @p sleep the grid shall be deleted.
      */
     const unsigned int sleep_level_to_delete_grid;
-
-    /**
-     * Exception
-     */
-    DeclException1 (ExcInvalidParameter,
-                    int,
-                    << "The parameter " << arg1 << " has an invalid value.");
   };
 
 
@@ -1195,7 +1184,9 @@ namespace TimeStepBase_Tria_Flags
      */
     DeclException1 (ExcInvalidValue,
                     double,
-                    << "The following value does not fulfill the requirements: " << arg1);
+                    << "The value " << arg1
+                    << " for the cell number corridor does not fulfill "
+                    "its natural requirements.");
   };
 
 
@@ -1234,7 +1225,9 @@ namespace TimeStepBase_Tria_Flags
      */
     DeclException1 (ExcInvalidValue,
                     double,
-                    << "The following value does not fulfill the requirements: " << arg1);
+                    << "The value " << arg1
+                    << " for the cell refinement thresholds does not fulfill "
+                    "its natural requirements.");
   };
 }
 
@@ -1404,7 +1397,9 @@ public:
   /**
    * Exception
    */
-  DeclException0 (ExcGridNotDeleted);
+  DeclExceptionMsg (ExcGridNotDeleted,
+                    "When calling restore_grid(), you must have previously "
+                    "deleted the triangulation.");
 
 protected:
 
index 31a2513b306e010dba32620e7a38a2976defdcc8..c385300cb9d40536b6ebd138876b6ed35c526a8f 100644 (file)
@@ -342,7 +342,9 @@ TimeStepBase::get_timestep_no () const
 double
 TimeStepBase::get_backward_timestep () const
 {
-  Assert (previous_timestep != 0, ExcCantComputeTimestep());
+  Assert (previous_timestep != 0,
+          ExcMessage("The backward time step cannot be computed because "
+                     "there is no previous time step."));
   return time - previous_timestep->time;
 }
 
@@ -351,7 +353,9 @@ TimeStepBase::get_backward_timestep () const
 double
 TimeStepBase::get_forward_timestep () const
 {
-  Assert (next_timestep != 0, ExcCantComputeTimestep());
+  Assert (next_timestep != 0,
+          ExcMessage("The forward time step cannot be computed because "
+                     "there is no next time step."));
   return next_timestep->time - time;
 }
 

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.