mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibJS+LibLocale: Propagate errors from find_regional_values_for_locale
This had quite the footprint.
This commit is contained in:
parent
b2097f4059
commit
5e29e04122
16 changed files with 184 additions and 183 deletions
|
@ -481,7 +481,7 @@ ThrowCompletionOr<Vector<PatternPartition>> partition_duration_format_pattern(VM
|
|||
// c. If nextValue is not 0 or nextDisplay is not "auto", then
|
||||
if (next_value != 0.0 || next_display != DurationFormat::Display::Auto) {
|
||||
// i. Let separator be dataLocaleData.[[formats]].[[digital]].[[separator]].
|
||||
auto separator = ::Locale::get_number_system_symbol(data_locale, duration_format.numbering_system(), ::Locale::NumericSymbol::TimeSeparator).value_or(":"sv);
|
||||
auto separator = TRY_OR_THROW_OOM(vm, ::Locale::get_number_system_symbol(data_locale, duration_format.numbering_system(), ::Locale::NumericSymbol::TimeSeparator)).value_or(":"sv);
|
||||
|
||||
// ii. Append the new Record { [[Type]]: "literal", [[Value]]: separator} to the end of result.
|
||||
result.append({ "literal"sv, TRY_OR_THROW_OOM(vm, String::from_utf8(separator)) });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue