1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

LibJS: Convert Calendar AOs to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-16 21:42:01 +01:00
parent dea43d88e7
commit f8d92232c8
22 changed files with 349 additions and 416 deletions

View file

@ -81,9 +81,7 @@ ThrowCompletionOr<PlainTime*> to_temporal_time(GlobalObject& global_object, Valu
}
// d. Let calendar be ? GetTemporalCalendarWithISODefault(item).
auto* calendar = get_temporal_calendar_with_iso_default(global_object, item_object);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto* calendar = TRY(get_temporal_calendar_with_iso_default(global_object, item_object));
// e. If ? ToString(calendar) is not "iso8601", then
auto calendar_identifier = Value(calendar).to_string(global_object);