fix: better error message

This commit is contained in:
egarette@silique.fr 2025-05-05 08:39:43 +02:00
parent c54f7cb775
commit 5ed902a372

View file

@ -643,11 +643,12 @@ def manager_callback(
if param.optional:
raise CancelParam(callbk_option.impl_getpath(), child_path)
identifiers = display_list(doption.get_identifiers(parent), add_quote=True)
doption_name = doption.impl_get_display_name(
None, with_quote=True
)
errors.raise_carry_out_calculation_error(subconfig, _('cannot calculate arguments for "{0}", cannot find dynamic variable "{1}" with identifier "{2}", list of valid identifiers: {3}'), err, extra_keys=[doption_name, identifier, identifiers])
identifiers = doption.get_identifiers(parent)
if not identifiers:
errors.raise_carry_out_calculation_error(subconfig, _('cannot calculate arguments for {0}, {1} with identifier "{2}", there is no identifiers'), err, extra_keys=[identifier])
else:
identifiers_list = display_list(identifiers, add_quote=True)
errors.raise_carry_out_calculation_error(subconfig, _('cannot calculate arguments for {0}, {1} with identifier "{2}", list of valid identifiers: {3}'), err, extra_keys=[identifier, identifiers_list])
new_parents.append(
parent.get_child(
doption,