aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-07-20 13:43:56 -0400
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-07-21 19:45:37 +0200
commit2379fc72bcd598e84f1b6b4e27a2f11cfff644f3 (patch)
treea05542ce649c3be66c348034f523aa963e60b0ed /mesonbuild/msubprojects.py
parent9afd589c8b77d1e9d279813a71ec1451476a0be8 (diff)
downloadmeson-2379fc72bcd598e84f1b6b4e27a2f11cfff644f3.zip
meson-2379fc72bcd598e84f1b6b4e27a2f11cfff644f3.tar.gz
meson-2379fc72bcd598e84f1b6b4e27a2f11cfff644f3.tar.bz2
msubprojects: catch exceptions and continue with others
If the command fails for one subproject we should still continue with others. Failed subprojects are reported at the end. This issue became more problematic when doing parallel tasks because the reason the command fails was completely hidden by other parallel tasks.
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-xmesonbuild/msubprojects.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 5d1fb72..269f0fe 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -70,7 +70,11 @@ class Runner:
def run(self):
self.logger.start(self.wrap.name)
- result = self.run_method()
+ try:
+ result = self.run_method()
+ except MesonException as e:
+ self.log(mlog.red('Error:'), str(e))
+ result = False
self.logger.done(self.wrap.name, self.log_queue)
return result