use specialized exception classes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user