aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurin-Luis Lehning <65224843+e820@users.noreply.github.com>2021-03-07 21:16:13 +0100
committerXavier Claessens <xclaesse@gmail.com>2021-03-10 08:55:22 -0500
commit83c3c745103a254f45ef8b28c5a3e307795ee752 (patch)
treeec80ea0f34bb1cbc65ec4ecd2726d3582f616c98
parent07f467d0573d00a47e7d21a9a5cdf88ad813d1fc (diff)
downloadmeson-83c3c745103a254f45ef8b28c5a3e307795ee752.zip
meson-83c3c745103a254f45ef8b28c5a3e307795ee752.tar.gz
meson-83c3c745103a254f45ef8b28c5a3e307795ee752.tar.bz2
Use interpreter exceptions instead of MesonException
-rw-r--r--mesonbuild/interpreterbase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 93cd1c6..bc0c932 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -936,11 +936,11 @@ The result of this is undefined and will become a hard error in a future Meson r
try:
val = self.variables[var]
if not isinstance(val, (str, int, float, bool)):
- raise mesonlib.MesonException(f'Identifier {var} does not name a formattable variable.')
+ raise InvalidCode(f'Identifier {var} does not name a formattable variable.')
return str(val)
except KeyError:
- raise mesonlib.MesonException(f'Identifier "{var}" does not name a variable.')
+ raise InvalidCode(f'Identifier "{var}" does not name a variable.')
return re.sub(r'@([_a-zA-Z][_0-9a-zA-Z]*)@', replace, node.value)