1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

LibJS: Propagate OOM errors from the PartitionPattern Abstract Operation

This commit is contained in:
Timothy Flynn 2023-01-19 12:26:37 -05:00 committed by Linus Groh
parent bff0e25ebe
commit 1e6e719592
17 changed files with 74 additions and 69 deletions

View file

@ -45,8 +45,7 @@ ThrowCompletionOr<Value> NumberFormatFunction::call()
auto mathematical_value = TRY(to_intl_mathematical_value(vm, value));
// 5. Return ? FormatNumeric(nf, x).
// Note: Our implementation of FormatNumeric does not throw.
auto formatted = format_numeric(vm, m_number_format, move(mathematical_value));
auto formatted = TRY(format_numeric(vm, m_number_format, move(mathematical_value)));
return PrimitiveString::create(vm, move(formatted));
}