0.1.8
Loading...
Searching...
No Matches
pyhelios.validation.exceptions.ValidationError Class Reference

Validation-specific exceptions for PyHelios. More...

Detailed Description

Validation-specific exceptions for PyHelios.

Provides ValidationError that extends HeliosInvalidArgumentError with enhanced error messaging and context information.

Validation-specific error with standardized messaging.

Raised when parameter validation fails, with clear error messages that include:

  • Parameter name and expected type/range
  • Actual value provided and its type
  • Actionable solution or correct usage example

Following PyHelios's fail-fast philosophy, validation errors are raised immediately at API boundaries before reaching C++ code.

Definition at line 19 of file exceptions.py.

+ Inheritance diagram for pyhelios.validation.exceptions.ValidationError:
+ Collaboration diagram for pyhelios.validation.exceptions.ValidationError:

Public Member Functions

 __init__ (self, str message, str param_name=None, str function_name=None, str expected_type=None, actual_value=None)
 Initialize validation error with enhanced context.
 

Public Attributes

 param_name = param_name
 
 function_name = function_name
 
 expected_type = expected_type
 
 actual_value = actual_value
 

Constructor & Destructor Documentation

◆ __init__()

pyhelios.validation.exceptions.ValidationError.__init__ ( self,
str message,
str param_name = None,
str function_name = None,
str expected_type = None,
actual_value = None )

Initialize validation error with enhanced context.

Parameters
messagePrimary error message
param_nameName of the parameter that failed validation
function_nameName of the function where validation failed
expected_typeExpected type or range description
actual_valueThe actual value that failed validation

Definition at line 31 of file exceptions.py.

Member Data Documentation

◆ actual_value

pyhelios.validation.exceptions.ValidationError.actual_value = actual_value

Definition at line 50 of file exceptions.py.

◆ expected_type

pyhelios.validation.exceptions.ValidationError.expected_type = expected_type

Definition at line 49 of file exceptions.py.

◆ function_name

pyhelios.validation.exceptions.ValidationError.function_name = function_name

Definition at line 48 of file exceptions.py.

◆ param_name

pyhelios.validation.exceptions.ValidationError.param_name = param_name

Definition at line 47 of file exceptions.py.


The documentation for this class was generated from the following file: