interpreter: Do not ignore all exceptions when adding compiler

Suppressing all exceptions was hidding even syntax errors in compiler
source code. If a compiler cannot be found, a MesonException is raised,
we should only expect that type.
This commit is contained in:
Xavier Claessens 2023-02-16 12:14:51 -05:00 committed by Xavier Claessens
parent f0335dc7dd
commit ba1737cb66
1 changed files with 1 additions and 1 deletions

View File

@ -1443,7 +1443,7 @@ class Interpreter(InterpreterBase, HoldableObject):
mlog.log_once('Cross compiler sanity tests disabled via the cross file.')
else:
comp.sanity_check(self.environment.get_scratch_dir(), self.environment)
except Exception:
except mesonlib.MesonException:
if not required:
mlog.log('Compiler for language',
mlog.bold(lang), 'for the', machine_name,