aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-07-18 02:27:32 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-07-18 02:27:34 +0530
commitc527e4a658a5fda8a13e0da82375ffeba58c703a (patch)
tree07edbaefa3564cc55bf4fdf47c58333bc9200e00
parent9e37c8a308db3300f9f5f91ea4da0ccd86f195b1 (diff)
downloadmeson-c527e4a658a5fda8a13e0da82375ffeba58c703a.zip
meson-c527e4a658a5fda8a13e0da82375ffeba58c703a.tar.gz
meson-c527e4a658a5fda8a13e0da82375ffeba58c703a.tar.bz2
coredata: Descriptive parser exceptions for UserStringArrayOption
-rw-r--r--mesonbuild/coredata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index dc7973e..c397509 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -100,10 +100,10 @@ class UserStringArrayOption(UserOption):
raise MesonException('Valuestring does not define an array: ' + newvalue)
newvalue = eval(newvalue, {}, {}) # Yes, it is unsafe.
if not isinstance(newvalue, list):
- raise MesonException('String array value is not an array.')
+ raise MesonException('"{0}" should be a string array, but it is not'.format(str(newvalue)))
for i in newvalue:
if not isinstance(i, str):
- raise MesonException('String array element not a string.')
+ raise MesonException('String array element "{0}" is not a string.'.format(str(newvalue)))
self.value = newvalue
# This class contains all data that must persist over multiple