better debug

This commit is contained in:
egarette@silique.fr 2023-02-27 13:51:46 +01:00
parent 245d5c02fb
commit add176331e
3 changed files with 6 additions and 4 deletions

View file

@ -19,11 +19,8 @@
# the whole pypy projet is under MIT licence # the whole pypy projet is under MIT licence
# ____________________________________________________________ # ____________________________________________________________
import re import re
import sys
from ..setting import undefined, Undefined, OptionBag
from ..i18n import _ from ..i18n import _
from .option import Option
from .stroption import StrOption from .stroption import StrOption

View file

@ -117,6 +117,7 @@ FORBIDDEN_SET_PERMISSIVES = frozenset(['force_default_on_freeze',
'force_metaconfig_on_freeze', 'force_metaconfig_on_freeze',
'force_store_value']) 'force_store_value'])
ALLOWED_LEADER_PROPERTIES = frozenset(['empty', ALLOWED_LEADER_PROPERTIES = frozenset(['empty',
'notempty',
'notunique', 'notunique',
'unique', 'unique',
'force_store_value', 'force_store_value',

View file

@ -175,7 +175,11 @@ class Values:
value, value,
reset_cache=True): reset_cache=True):
if isinstance(value, Calculation): if isinstance(value, Calculation):
try:
value = await value.execute(option_bag) value = await value.execute(option_bag)
except ConfigError as err:
msg = _(f'error when calculating "{option_bag.option.impl_get_display_name()}": {err} : {option_bag.path}')
raise ConfigError(msg) from err
elif isinstance(value, (list, tuple)): elif isinstance(value, (list, tuple)):
value = await self._do_value_list(value, option_bag) value = await self._do_value_list(value, option_bag)
if reset_cache: if reset_cache: