mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
Notes:
sideshowbarker
2024-07-17 01:07:29 +09:00
Author: https://github.com/trflynn89
Commit: 5e29e04122
Pull-request: https://github.com/SerenityOS/serenity/pull/17202
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