Skip to main content

dict_value_error

No overview available.

def dict_value_error(
key: string,
value: any,
message: string
) - > null

Raises a ValueError containing a formatted message when a dictionary key is missing or its value is invalid. Use this to provide consistent error reporting during dictionary validation or configuration parsing.

Parameters

NameTypeDescription
keystringThe dictionary key name that triggered the validation error
valueanyThe invalid value associated with the key, which will be included in the error message for debugging
messagestringA specific explanation of why the value is considered invalid or what the expected format was

Returns

TypeDescription
nullThis function does not return a value as it always raises an exception.