better support of notraisepropertyerror
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
from typing import Any, Optional, Union, Callable, Dict, List
|
||||
|
||||
|
||||
from .error import PropertiesOptionError, ConfigError, SlaveError, RequirementError
|
||||
from .error import PropertiesOptionError, ConfigError, SlaveError
|
||||
from .i18n import _
|
||||
from .setting import undefined, ConfigBag, OptionBag, Undefined
|
||||
from .storage import get_default_values_storages, get_default_settings_storages
|
||||
@ -89,12 +89,10 @@ def manager_callback(callbk: Union[ParamOption, ParamValue],
|
||||
if with_index:
|
||||
return value[index]
|
||||
return value
|
||||
except (PropertiesOptionError, RequirementError) as err:
|
||||
except PropertiesOptionError as err:
|
||||
# raise because must not add value None in carry_out_calculation
|
||||
if callbk.notraisepropertyerror:
|
||||
raise PropertiesOptionError(option_bag,
|
||||
None,
|
||||
None)
|
||||
raise err
|
||||
raise ConfigError(_('unable to carry out a calculation for "{}"'
|
||||
', {}').format(option.impl_get_display_name(), err))
|
||||
|
||||
|
Reference in New Issue
Block a user