mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibUnicode: Print error codes when calls to ICU fail
Primary motivation for this change is the `VERIFY(icu_success(status))` line in `Segmenter::create()` that was failing on multiple systems and where we had to ask people to apply a patch to even know what the error was. Since this seems to be a recurring problem, let's just add a little helper function and print the error codes returned by library calls.
This commit is contained in:
committed by
Tim Flynn
parent
77a3de4561
commit
1b2bca7831
Notes:
github-actions[bot]
2026-02-21 21:56:43 +00:00
Author: https://github.com/InvalidUsernameException Commit: https://github.com/LadybirdBrowser/ladybird/commit/1b2bca7831d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8068 Reviewed-by: https://github.com/trflynn89
@@ -248,7 +248,7 @@ NonnullOwnPtr<RelativeTimeFormat> RelativeTimeFormat::create(StringView locale,
|
||||
static_cast<icu::DecimalFormat&>(*number_formatter).setMinimumGroupingDigits(UNUM_MINIMUM_GROUPING_DIGITS_AUTO);
|
||||
|
||||
auto formatter = make<icu::RelativeDateTimeFormatter>(locale_data->locale(), number_formatter, icu_relative_date_time_style(style), UDISPCTX_CAPITALIZATION_NONE, status);
|
||||
VERIFY(icu_success(status));
|
||||
verify_icu_success(status);
|
||||
|
||||
return make<RelativeTimeFormatImpl>(move(formatter));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user