Exceptions

class babelfish.exceptions.Error

Base class for all exceptions in babelfish

class babelfish.exceptions.LanguageConvertError(alpha3, country=None, script=None)

Exception raised by converters when convert() fails

Parameters:
  • alpha3 (string) – alpha3 code that failed conversion
  • country (string or None) – country code that failed conversion, if any
  • script (string or None) – script code that failed conversion, if any
class babelfish.exceptions.LanguageReverseError(code)

Exception raised by converters when reverse() fails

Parameters:code (string) – code that failed reverse conversion
class babelfish.exceptions.CountryConvertError(alpha2)

Exception raised by converters when convert() fails

Parameters:alpha2 (string) – alpha2 code that failed conversion
class babelfish.exceptions.CountryReverseError(code)

Exception raised by converters when reverse() fails

Parameters:code (string) – code that failed reverse conversion