From ba1737cb66c97e1d3256f626ab7e360798376e9d Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 16 Feb 2023 12:14:51 -0500 Subject: 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. --- mesonbuild/interpreter/interpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild') diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index b740846..2bf97da 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -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, -- cgit v1.1