Search code examples
icu

ICU equivalent of strerror(3) for getting the message for a UErrorCode?


I've tried RTM, but: given an ICU UErrorCode, how can I obtain the corresponding error message string? I.e., ICU's equivalent of strerror(3).


Solution

  • const char *u_errorName(UErrorCode code) is the C version of ErrorCode::errorName - but there isn't an "error message" that is anything more than the enum name. That's a great idea, though- I'd recommend to file a bug. Or, consider contributing the code and data? Ideally it would be a localized message…