aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-06 23:47:15 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-07 04:33:24 -0700
commit2093d45a4e1203d868d200628918472877c7ec31 (patch)
treea7253981585f71f5bd3a0053deff8ed90ad690ee /mesonbuild/interpreterbase.py
parent80392225a61a5baa28ef1f45bfc19b4623d2d188 (diff)
downloadmeson-2093d45a4e1203d868d200628918472877c7ec31.zip
meson-2093d45a4e1203d868d200628918472877c7ec31.tar.gz
meson-2093d45a4e1203d868d200628918472877c7ec31.tar.bz2
Print a more usable message when a subproject fails to configure
Instead of just printing the message in the exception, if it's a MesonException, also print the file and the line number. If it's an unknown exception, print the entire traceback so that we can pin-point what the Meson bug causing it is.
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 dfdccb1..64177ab 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -394,7 +394,7 @@ class InterpreterBase:
self.current_lineno = cur.lineno
self.evaluate_statement(cur)
except Exception as e:
- if not(hasattr(e, 'lineno')):
+ if not hasattr(e, 'lineno'):
e.lineno = cur.lineno
e.colno = cur.colno
e.file = os.path.join(self.subdir, 'meson.build')