aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-03-15 22:30:21 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-03-15 22:30:21 +0200
commitaf82d04b3f8c1d5693723d4fe12e7890108a827b (patch)
treedd6f82d4ed5558840d0d4759a089f81e217f5a29 /meson.py
parent18c78c1bb93a19b070ae631fffddd42f6d9b8a3d (diff)
downloadmeson-af82d04b3f8c1d5693723d4fe12e7890108a827b.zip
meson-af82d04b3f8c1d5693723d4fe12e7890108a827b.tar.gz
meson-af82d04b3f8c1d5693723d4fe12e7890108a827b.tar.bz2
Print friendlier error messages rather than the Python stack trace.
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.py b/meson.py
index b313d45..f8e37ab 100755
--- a/meson.py
+++ b/meson.py
@@ -127,5 +127,10 @@ if __name__ == '__main__':
app = MesonApp(dir1, dir2, this_file, options)
print ('Source dir: ' + app.source_dir)
print ('Build dir: ' + app.build_dir)
- app.generate()
+ try:
+ app.generate()
+ except Exception as e:
+ print('\nMeson encountered an error:')
+ print(e)
+ sys.exit(1)