error_message#

Module for customizing exception messages.

Functions:

allowed_name_error_message(allowed_values[, ...])

Provide an error message with the closest names matching the trial_name from the allowed_values list.

allowed_values_error(context, trial_name, ...)

Provide an error message for disallowed values.

closest_allowed_names(trial_name, allowed_names)

Check if the trial_name is closely matching the allowed_names.

ansys.cfx.core.common.error_message.allowed_name_error_message(allowed_values: Any, context: str | None = None, trial_name: str | None = None, message: str | None = None) str#

Provide an error message with the closest names matching the trial_name from the allowed_values list.

ansys.cfx.core.common.error_message.allowed_values_error(context: str, trial_name: str, allowed_values: List[str]) ValueError#

Provide an error message for disallowed values.

ansys.cfx.core.common.error_message.closest_allowed_names(trial_name: str, allowed_names: str) List[str]#

Check if the trial_name is closely matching the allowed_names.