From 6033c0f0da764e9d81e35366a6ba81b8f6b984f7 Mon Sep 17 00:00:00 2001 From: Nellie Zhang Date: Sat, 8 May 2021 11:24:22 -0400 Subject: [PATCH] Fix python exception thrown for invalid resource path If an invalid resource path is specified, then an uncaught python exception occurs, and a backtrace is shown. Throw a MesonException instead to produce a cleaner error message. --- mesonbuild/modules/qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index 645696d2e..b7389bd59 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -136,7 +136,7 @@ class QtBaseModule(ExtensionModule): return rcc_dirname, result except Exception: - return [] + raise MesonException(f'Unable to parse resource file {abspath}') def parse_qrc_deps(self, state, rcc_file): rcc_dirname, nodes = self.qrc_nodes(state, rcc_file)