aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-15 14:47:55 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-06-18 23:48:33 +0200
commit468a215341a019e7c7f5a7aa43c7fcbb0a104eb8 (patch)
treec5a80c8eff15008d71148e9c1b91cca3d88c6e2a
parent99a91df844f347568c851932a78909b80165fe80 (diff)
downloadmeson-468a215341a019e7c7f5a7aa43c7fcbb0a104eb8.zip
meson-468a215341a019e7c7f5a7aa43c7fcbb0a104eb8.tar.gz
meson-468a215341a019e7c7f5a7aa43c7fcbb0a104eb8.tar.bz2
mesonlib: Add MesonBugException
-rw-r--r--mesonbuild/mesonlib/universal.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index 08e8b9e..9daabee 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -52,6 +52,7 @@ __all__ = [
'LibType',
'MachineChoice',
'MesonException',
+ 'MesonBugException',
'EnvironmentException',
'FileOrString',
'GitException',
@@ -164,6 +165,14 @@ class MesonException(Exception):
self.colno = colno
+class MesonBugException(MesonException):
+ '''Exceptions thrown when there is a clear Meson bug that should be reported'''
+
+ def __init__(self, msg: str, file: T.Optional[str] = None,
+ lineno: T.Optional[int] = None, colno: T.Optional[int] = None):
+ super().__init__(msg + '\n\n This is a Meson bug and should be reported!',
+ file=file, lineno=lineno, colno=colno)
+
class EnvironmentException(MesonException):
'''Exceptions thrown while processing and creating the build environment'''