diff --git a/generate_parameter_library_py/generate_parameter_library_py/python_convertions.py b/generate_parameter_library_py/generate_parameter_library_py/python_convertions.py index 379c9c9..4790900 100644 --- a/generate_parameter_library_py/generate_parameter_library_py/python_convertions.py +++ b/generate_parameter_library_py/generate_parameter_library_py/python_convertions.py @@ -92,7 +92,7 @@ def get_func_signature(self, function_name: str, base_type: str) -> str: @typechecked def initialization_fail_validation(self, param_name: str) -> str: - return f"raise InvalidParameterValueException('Invalid value set during initialization for parameter {param_name}: ' + validation_result)" + return f"raise InvalidParameterValueException('{param_name}',param.value, 'Invalid value set during initialization for parameter {param_name}: ' + validation_result)" @typechecked def initialization_pass_validation(self, param_name: str) -> str: diff --git a/generate_parameter_library_py/generate_parameter_library_py/python_validators.py b/generate_parameter_library_py/generate_parameter_library_py/python_validators.py index 4c1097d..629a740 100644 --- a/generate_parameter_library_py/generate_parameter_library_py/python_validators.py +++ b/generate_parameter_library_py/generate_parameter_library_py/python_validators.py @@ -71,7 +71,7 @@ def one_of(param, values): # Array validators def unique(param): - if not len(set(param.value)) != len(param.value): + if len(set(param.value)) != len(param.value): return f"Parameter '{param.name}' must only contain unique values" return ""