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:
Shannon Booth 2023-12-28 13:15:36 +13:00 committed by Andreas Kling
commit 986abe7047
Notes: sideshowbarker 2024-07-17 16:23:06 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -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));