aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-02-12 17:18:53 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-02-28 11:54:04 +0000
commit534a974da756c4b71b7ba10a6853c2be14a9b30e (patch)
tree7585e2faf0d8ef0ae84d3e533c89c2d25d455ddd /mesonbuild/interpreterbase.py
parent4895830c28dda6f009aeaec0663b5bba88b3d1b3 (diff)
downloadmeson-534a974da756c4b71b7ba10a6853c2be14a9b30e.zip
meson-534a974da756c4b71b7ba10a6853c2be14a9b30e.tar.gz
meson-534a974da756c4b71b7ba10a6853c2be14a9b30e.tar.bz2
Adjust all the other places MesonException file attribute is set
A MesonException has file, lineno and colno attributes, which get formatted as a location in mlog.exception(). The file attribute got changed from a path relative to the root source directory to a pathname (absolute or relative to cwd) in one place in commit b8fbbf59. Adjust all the other places the file attribute is set to match. Also: Setting MesonException.file seems to be missing in the case where Parser returned a non-CodeBlockNode object. Fortunately, that looks like it's unreachable, but add it just in case.
Diffstat (limited to 'mesonbuild/interpreterbase.py')
-rw-r--r--mesonbuild/interpreterbase.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 2a976d3..842aeac 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -432,7 +432,7 @@ class InterpreterBase:
if not hasattr(e, 'lineno'):
e.lineno = cur.lineno
e.colno = cur.colno
- e.file = os.path.join(self.subdir, 'meson.build')
+ e.file = os.path.join(self.source_root, self.subdir, environment.build_filename)
raise e
i += 1 # In THE FUTURE jump over blocks and stuff.