From: Wolfgang Bangerth Date: Sun, 15 Mar 2015 06:48:11 +0000 (-0500) Subject: Adjust error messages in the TimeDependent class and friends. X-Git-Tag: v8.3.0-rc1~369^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e53242e4aeb8d8d23afce53277c92594af51745;p=dealii.git Adjust error messages in the TimeDependent class and friends. --- diff --git a/include/deal.II/numerics/time_dependent.h b/include/deal.II/numerics/time_dependent.h index dd8dc29598..bf56248fa7 100644 --- a/include/deal.II/numerics/time_dependent.h +++ b/include/deal.II/numerics/time_dependent.h @@ -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: diff --git a/source/numerics/time_dependent.cc b/source/numerics/time_dependent.cc index 31a2513b30..c385300cb9 100644 --- a/source/numerics/time_dependent.cc +++ b/source/numerics/time_dependent.cc @@ -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; }