diff options
author | Thomas Touhey <thomas@touhey.fr> | 2022-07-03 14:24:44 +0200 |
---|---|---|
committer | Thomas Touhey <thomas@touhey.fr> | 2022-07-03 14:24:44 +0200 |
commit | 42865c468623329f3d9fb08130498d03ab1f77b6 (patch) | |
tree | 200b15c715eeb73540fddb8c5c70867cb0ef5524 /thcolor/errors.py | |
parent | 3708f0dd0bc98d9688fcf0dada282c12d0cecd95 (diff) |
Diffstat (limited to 'thcolor/errors.py')
-rwxr-xr-x | thcolor/errors.py | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/thcolor/errors.py b/thcolor/errors.py index 37bf337..5c6e0f4 100755 --- a/thcolor/errors.py +++ b/thcolor/errors.py @@ -3,17 +3,15 @@ # Copyright (C) 2019-2022 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr> # This file is part of the thcolor project, which is MIT-licensed. # ***************************************************************************** -""" Exception definitions. """ +"""Exception definitions.""" -__all__ = [ - 'ColorExpressionSyntaxError', -] +__all__ = ['ColorExpressionSyntaxError'] class ColorExpressionSyntaxError(Exception): - """ An error has occurred while decoding a color expression. + """An error has occurred while decoding a color expression. - Such an error can happen during parsing or evaluating. + Such an error can happen during parsing or evaluating. """ def __init__(self, text, column=None, func=None): @@ -37,28 +35,28 @@ class ColorExpressionSyntaxError(Exception): @property def text(self): - """ Exception message, usually linked to the context. """ + """Exception message, usually linked to the context.""" return self._text @property def column(self): - """ Column of the expression at which the exception has occurred. + """Column of the expression at which the exception has occurred. - ``None`` if the error has occurred on an unknown column or on - the whole exception. + ``None`` if the error has occurred on an unknown column or on + the whole exception. """ return self._column @property def func(self): - """ Name of the function we were calling when the error occurred. + """Name of the function we were calling when the error occurred. - Either on arguments decoding or erroneous argument type or value. - Is ``None`` if the context is unknown or the error hasn't - occurred while calling a function or decoding its - arguments. + Either on arguments decoding or erroneous argument type or value. + Is ``None`` if the context is unknown or the error hasn't + occurred while calling a function or decoding its + arguments. """ return self._func |