///|
/// Catalog failure wrapping a binary or plural error, or identifying an unavailable translation slot.
/// Example: `cat.try_ngettext_checked("lamp", 2) catch { _ => None }`.
#derive(Eq, @debug.Debug)
pub suberror GettextError {
Mo(@mo.MoError)
Plural(@plural.PluralError)
PluralFormOutOfRange(
msgid~ : String,
index~ : Int32,
available_forms~ : Int32,
nplurals~ : Int32,
)
}
///|
/// Write the diagnostic representation of GettextError to a logger.
/// Example: `value.to_string()`.
pub impl Show for GettextError with fn output(self, logger) {
logger.write_string(@debug.to_string(self))
}