aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mparser.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-03-01 21:11:32 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-03-01 23:13:29 -0500
commit9423631b76093480e619beb2281caa017c981f7a (patch)
tree3a149aefcb8d576b94ae9608a19c18bf6014b40c /mesonbuild/mparser.py
parent774212e73834bf44a7b093799543d13ce739717a (diff)
downloadmeson-9423631b76093480e619beb2281caa017c981f7a.zip
meson-9423631b76093480e619beb2281caa017c981f7a.tar.gz
meson-9423631b76093480e619beb2281caa017c981f7a.tar.bz2
mparser: use an inherited ParseException everywhere
Diffstat (limited to 'mesonbuild/mparser.py')
-rw-r--r--mesonbuild/mparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index e444030..dbb6a45 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -47,7 +47,7 @@ class ParseException(MesonException):
self.lineno = lineno
self.colno = colno
-class BlockParseException(MesonException):
+class BlockParseException(ParseException):
def __init__(
self,
text: str,
@@ -67,7 +67,7 @@ class BlockParseException(MesonException):
# Followed by a caret to show the block start
# Followed by underscores
# Followed by a caret to show the block end.
- super().__init__("{}\n{}\n{}".format(text, line, '{}^{}^'.format(' ' * start_colno, '_' * (colno - start_colno - 1))))
+ MesonException.__init__(self, "{}\n{}\n{}".format(text, line, '{}^{}^'.format(' ' * start_colno, '_' * (colno - start_colno - 1))))
else:
# If block start and end are on different lines, it is formatted as:
# Error message
@@ -76,7 +76,7 @@ class BlockParseException(MesonException):
# Followed by a message saying where the block started.
# Followed by the line of the block start.
# Followed by a caret for the block start.
- super().__init__("%s\n%s\n%s\nFor a block that started at %d,%d\n%s\n%s" % (text, line, '%s^' % (' ' * colno), start_lineno, start_colno, start_line, "%s^" % (' ' * start_colno)))
+ MesonException.__init__(self, "%s\n%s\n%s\nFor a block that started at %d,%d\n%s\n%s" % (text, line, '%s^' % (' ' * colno), start_lineno, start_colno, start_line, "%s^" % (' ' * start_colno)))
self.lineno = lineno
self.colno = colno