diff options
-rw-r--r-- | mesonbuild/interpreterbase.py | 4 |
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) |