X-Git-Url: https://git.korewanetadesu.com/?p=python-collate.git;a=blobdiff_plain;f=collate%2Ferrors.py;h=a425087f3776ba5bbdcd92be4d5babe795bd5546;hp=cef5c0712dc156925a4e66682edee6ace8775715;hb=b30fef1f66891b5324e21e0f63f320df8c9880f2;hpb=29f1f7e12a4ca6100b00dc0d32e84f82f530bcb4 diff --git a/collate/errors.py b/collate/errors.py index cef5c07..a425087 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 + ValueError.__init__(self, string or locale)