use specialized exception classes

This commit is contained in:
wmayer
2017-04-28 18:49:11 +02:00
parent 0a32b91b6b
commit 1673ab801e
60 changed files with 675 additions and 349 deletions

View File

@@ -1715,9 +1715,9 @@ double num_change(char* yytext,char dez_delim,char grp_delim)
errno = 0;
ret_val = strtod( temp, NULL );
if (ret_val == 0 && errno == ERANGE)
throw Base::Exception("Number underflow.");
throw Base::UnderflowError("Number underflow.");
if (ret_val == HUGE_VAL || ret_val == -HUGE_VAL)
throw Base::Exception("Number overflow.");
throw Base::OverflowError("Number overflow.");
return ret_val;
}