LibJS+LibLocale: Propagate errors from find_regional_values_for_locale

This had quite the footprint.
This commit is contained in:
Timothy Flynn 2023-01-27 11:12:01 -05:00 committed by Linus Groh
commit 5e29e04122
Notes: sideshowbarker 2024-07-17 01:07:29 +09:00
16 changed files with 184 additions and 183 deletions

View file

@ -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)) });