mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
LibJS: Rename IntlNumberIsNaNOrInfinity to NumberIsNaNOrInfinity
While only currently used in Intl in LibJS, this is a pretty generic error and is useful elsewhere. Rename it to something more generic.
This commit is contained in:
parent
56ec36a9dc
commit
986abe7047
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,6 @@
|
|||
M(IntlInvalidTime, "Time value must be between -8.64E15 and 8.64E15") \
|
||||
M(IntlInvalidUnit, "Unit {} is not a valid time unit") \
|
||||
M(IntlMinimumExceedsMaximum, "Minimum value {} is larger than maximum value {}") \
|
||||
M(IntlNumberIsNaNOrInfinity, "Number must not be NaN or Infinity") \
|
||||
M(IntlNumberIsNaNOrOutOfRange, "Value {} is NaN or is not between {} and {}") \
|
||||
M(IntlOptionUndefined, "Option {} must be defined when option {} is {}") \
|
||||
M(IntlNonNumericOr2DigitAfterNumericOr2Digit, "Styles other than 'numeric' and '2-digit' may not be used in smaller units after " \
|
||||
|
@ -106,6 +105,7 @@
|
|||
M(NotObjectCoercible, "{} cannot be converted to an object") \
|
||||
M(NotUndefined, "{} is not undefined") \
|
||||
M(NumberIsNaN, "{} must not be NaN") \
|
||||
M(NumberIsNaNOrInfinity, "Number must not be NaN or Infinity") \
|
||||
M(NumberIsNegative, "{} must not be negative") \
|
||||
M(ObjectDefineOwnPropertyReturnedFalse, "Object's [[DefineOwnProperty]] method returned false") \
|
||||
M(ObjectDeleteReturnedFalse, "Object's [[Delete]] method returned false") \
|
||||
|
|
|
@ -101,7 +101,7 @@ ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_patt
|
|||
|
||||
// 4. If value is NaN, +∞𝔽, or -∞𝔽, throw a RangeError exception.
|
||||
if (!Value(value).is_finite_number())
|
||||
return vm.throw_completion<RangeError>(ErrorType::IntlNumberIsNaNOrInfinity);
|
||||
return vm.throw_completion<RangeError>(ErrorType::NumberIsNaNOrInfinity);
|
||||
|
||||
// 5. Let unit be ? SingularRelativeTimeUnit(unit).
|
||||
auto time_unit = TRY(singular_relative_time_unit(vm, unit));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue