X-Git-Url: https://git.korewanetadesu.com/?p=python-collate.git;a=blobdiff_plain;f=collate%2Ferrors.py;h=ca8eec7c58c598a908da2cec889272c632f44884;hp=cef5c0712dc156925a4e66682edee6ace8775715;hb=7644110ce07ec8a78003ee7db9dcdfe5cbca3854;hpb=92fc0878bc7b75741a3434d17310e390a9304e70 diff --git a/collate/errors.py b/collate/errors.py index cef5c07..ca8eec7 100644 --- a/collate/errors.py +++ b/collate/errors.py @@ -1,2 +1,11 @@ +"""Exception types for the collate module.""" + class InvalidLocaleError(ValueError): - pass + """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)