aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-07-20 13:43:56 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2021-08-10 15:28:20 +0530
commit5fe6047b76c616c122fc6c308cad837a3b3f03a4 (patch)
tree42a90950afd62bc18d6421ce52b0c87cd2679086
parent3868e833fcf08463d2bc2d5dee1209125b826b9e (diff)
downloadmeson-5fe6047b76c616c122fc6c308cad837a3b3f03a4.zip
meson-5fe6047b76c616c122fc6c308cad837a3b3f03a4.tar.gz
meson-5fe6047b76c616c122fc6c308cad837a3b3f03a4.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.
-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