aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-07-20 10:32:28 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-07-21 19:38:55 +0300
commit381e8313ed191ae8e440a9ba3805d5322c769ea7 (patch)
tree3f8e830424d71055c48720470e34754afd26d916
parent26834a6198a5f580dc5d5775109d03b2df7809a9 (diff)
downloadmeson-381e8313ed191ae8e440a9ba3805d5322c769ea7.zip
meson-381e8313ed191ae8e440a9ba3805d5322c769ea7.tar.gz
meson-381e8313ed191ae8e440a9ba3805d5322c769ea7.tar.bz2
Make error message more informative
It's easier to identify a malformed variable assignment if we print it out.
-rw-r--r--mesonbuild/modules/pkgconfig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 75a6ad2..5d98167 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -155,11 +155,11 @@ class PkgConfigModule(ExtensionModule):
# foo=bar=baz is ('foo', 'bar=baz')
l = var.split('=', 1)
if len(l) < 2:
- raise mesonlib.MesonException('Variables must be in \'name=value\' format')
+ raise mesonlib.MesonException('Invalid variable "{}". Variables must be in \'name=value\' format'.format(var))
name, value = l[0].strip(), l[1].strip()
if not name or not value:
- raise mesonlib.MesonException('Variables must be in \'name=value\' format')
+ raise mesonlib.MesonException('Invalid variable "{}". Variables must be in \'name=value\' format'.format(var))
# Variable names must not contain whitespaces
if any(c.isspace() for c in name):