730{
732
733 if (*_number ==
__T(
'\0') || iswspace((wint_t)*_number)) {
734 throw new NumericConvertException(_number, 0, 0);
735 }
736
737 NumericConvertException::Error error = NumericConvertException::NoError;
738 wchar_t* endptr =
NULL;
739 float n = wcstof(_number, &endptr);
740 if (+HUGE_VALF ==
n || -HUGE_VALF ==
n) {
741 error = NumericConvertException::Overflow;
742 }
else if (!(FLT_MIN <
n)) {
743 error = NumericConvertException::Underflow;
744 }
745
746 if (NumericConvertException::NoError != error) {
747 throw new NumericConvertException(
748 error,
749 _number,
750 0
751 );
752 }
753
754 if ((endptr && *endptr != '\0') || errno == EINVAL) {
755 throw new NumericConvertException(
756 _number,
757 0,
758 endptr ? (endptr - _number) : 0
759 );
760 }
761
763}
#define __DCL_ASSERT(expr)
void CharsetConvertException *size_t n