aboutsummaryrefslogtreecommitdiff
path: root/thcolor/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'thcolor/errors.py')
-rwxr-xr-xthcolor/errors.py28
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