From 5fe6047b76c616c122fc6c308cad837a3b3f03a4 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 20 Jul 2021 13:43:56 -0400 Subject: [PATCH] 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. --- mesonbuild/msubprojects.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index 5d1fb72c3..269f0feba 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