From 40b5abd668c1cd082a34378ad424170ccf3f494d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 21 Mar 2019 21:01:07 +0200 Subject: [PATCH] Better error message when PCH argument is not a string. --- mesonbuild/build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index e2e558ab0..fc478992b 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1102,6 +1102,8 @@ You probably should put it in link_with instead.''') elif len(pchlist) > 2: raise InvalidArguments('PCH definition may have a maximum of 2 files.') for f in pchlist: + if not isinstance(f, str): + raise MesonException('PCH arguments must be strings.') if not os.path.isfile(os.path.join(self.environment.source_dir, self.subdir, f)): raise MesonException('File %s does not exist.' % f) self.pch[language] = pchlist