mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
LibJS: Add error message for invalid time zone in Temporal.TimeZone()
This commit is contained in:
parent
89641d90db
commit
d9cff591b6
Notes:
sideshowbarker
2024-07-18 10:12:29 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/d9cff591b6c Pull-request: https://github.com/SerenityOS/serenity/pull/8534
@ -162,6 +162,7 @@
|
||||
M(StringNonGlobalRegExp, "RegExp argument is non-global") \
|
||||
M(StringRawCannotConvert, "Cannot convert property 'raw' to object from {}") \
|
||||
M(StringRepeatCountMustBe, "repeat count must be a {} number") \
|
||||
M(TemporalInvalidTimeZoneName, "Invalid time zone name") \
|
||||
M(ThisHasNotBeenInitialized, "|this| has not been initialized") \
|
||||
M(ThisIsAlreadyInitialized, "|this| is already initialized") \
|
||||
M(ToObjectNullOrUndefined, "ToObject on null or undefined") \
|
||||
|
@ -64,7 +64,7 @@ Value TimeZoneConstructor::construct(FunctionObject& new_target)
|
||||
// a. If ! IsValidTimeZoneName(identifier) is false, then
|
||||
if (!is_valid_time_zone_name(identifier)) {
|
||||
// i. Throw a RangeError exception.
|
||||
vm.throw_exception<RangeError>(global_object);
|
||||
vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidTimeZoneName);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user