]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change some runtime-active Asserts to AssertThrow.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Nov 1999 15:29:40 +0000 (15:29 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Nov 1999 15:29:40 +0000 (15:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@1858 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/parameter_handler.cc

index 11824d821bb00acbd46d7c87fb72ee7d4f86f617..e851a40fd6bfdb1d94f5097c3636ab34a046fdcd 100644 (file)
@@ -414,8 +414,8 @@ long int ParameterHandler::get_integer (const string &entry_string) const {
   char *endptr;
   long int i = strtol (s.c_str(), &endptr, 10);
                                   // assert there was no error
-  Assert ((s.c_str()!='\0') || (*endptr == '\0'),
-         ExcConversionError(s));
+  AssertThrow ((s.c_str()!='\0') || (*endptr == '\0'),
+              ExcConversionError(s));
 
   return i;
 };
@@ -427,8 +427,8 @@ double ParameterHandler::get_double (const string &entry_string) const {
   char *endptr;
   double d = strtod (s.c_str(), &endptr);
                                   // assert there was no error
-  Assert ((s.c_str()!='\0') || (*endptr == '\0'),
-         ExcConversionError(s));
+  AssertThrow ((s.c_str()!='\0') || (*endptr == '\0'),
+              ExcConversionError(s));
 
   return d;
 };
@@ -438,7 +438,7 @@ double ParameterHandler::get_double (const string &entry_string) const {
 bool ParameterHandler::get_bool (const string &entry_string) const {
   string s = get(entry_string);
 
-  Assert ((s=="true") || (s=="false"), ExcConversionError(s));
+  AssertThrow ((s=="true") || (s=="false"), ExcConversionError(s));
   if (s=="true")
     return true;
   else

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.