diff options
author | Michael Hirsch <scivision@users.noreply.github.com> | 2020-06-09 08:43:43 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-10 01:05:41 +0300 |
commit | 58e1534773b4c402656abd0f1c760682b8af5860 (patch) | |
tree | 47c303a637618b38509ea3c3931dcaec9275709a | |
parent | 2fe4c60ae3f26c75ae45ab092321d07fb98bd52c (diff) | |
download | meson-58e1534773b4c402656abd0f1c760682b8af5860.zip meson-58e1534773b4c402656abd0f1c760682b8af5860.tar.gz meson-58e1534773b4c402656abd0f1c760682b8af5860.tar.bz2 |
tell variable name when erroring on bad combo option
fixes #7269
-rw-r--r-- | mesonbuild/coredata.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 8774b80..c70ca2d 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -161,7 +161,9 @@ class UserComboOption(UserOption[str]): def validate_value(self, value): if value not in self.choices: optionsstring = ', '.join(['"%s"' % (item,) for item in self.choices]) - raise MesonException('Value "%s" for combo option is not one of the choices. Possible choices are: %s.' % (value, optionsstring)) + raise MesonException('Value "{}" for combo option "{}" is not one of the choices.' + ' Possible choices are: {}.'.format( + value, self.description, optionsstring)) return value class UserArrayOption(UserOption[T.List[str]]): |