LibJS: Include time zone name in TemporalInvalidTimeZoneName error

This commit is contained in:
Linus Groh 2022-01-06 21:48:50 +01:00
commit d42336312c
Notes: sideshowbarker 2024-07-17 21:32:03 +09:00
4 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ ThrowCompletionOr<Object*> TimeZoneConstructor::construct(FunctionObject& new_ta
// a. If ! IsValidTimeZoneName(identifier) is false, then
if (!is_valid_time_zone_name(identifier)) {
// i. Throw a RangeError exception.
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidTimeZoneName);
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidTimeZoneName, identifier);
}
// b. Let canonical be ! CanonicalizeTimeZoneName(identifier).