InvalidLocaleError is more a LookupError than a ValueError.
[python-collate.git] / collate / errors.py
1 """Exception types for the collate module."""
2
3 class InvalidLocaleError(LookupError):
4 """Raised when an invalid locale is given to a function.
5
6 Attributes:
7 locale - the attempted invalid locale
8 """
9 def __init__(self, locale, string=""):
10 self.locale = locale
11 ValueError.__init__(self, string or locale)