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

LibJS: Convert install_error_cause() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-02 16:03:45 +01:00
parent 4d5bd092ea
commit 867b19affb
4 changed files with 25 additions and 19 deletions

View file

@ -51,9 +51,7 @@ Value AggregateErrorConstructor::construct(FunctionObject& new_target)
aggregate_error->create_non_enumerable_data_property_or_throw(vm.names.message, js_string(vm, message));
}
aggregate_error->install_error_cause(vm.argument(2));
if (vm.exception())
return {};
TRY_OR_DISCARD(aggregate_error->install_error_cause(vm.argument(2)));
auto errors_list = iterable_to_list(global_object, vm.argument(0));
if (vm.exception())