X-Git-Url: https://git.korewanetadesu.com/?p=python-collate.git;a=blobdiff_plain;f=collate%2Ferrors.py;h=13a1e1293a55c32f98fa012ba81b91ea5f85942d;hp=cef5c0712dc156925a4e66682edee6ace8775715;hb=e8b221311bf60883d3f14083bab63fd947d34509;hpb=29f1f7e12a4ca6100b00dc0d32e84f82f530bcb4 diff --git a/collate/errors.py b/collate/errors.py index cef5c07..13a1e12 100644 --- a/collate/errors.py +++ b/collate/errors.py @@ -1,2 +1,11 @@ -class InvalidLocaleError(ValueError): - pass +"""Exception types for the collate module.""" + +class InvalidLocaleError(LookupError): + """Raised when an invalid locale is given to a function. + + Attributes: + locale - the attempted invalid locale + """ + def __init__(self, locale, string=""): + self.locale = locale + LookupError.__init__(self, string or locale)