ValidationException
class ValidationException extends Exception
Exception thrown by {@link DataObject}::write if validation fails. By throwing an exception rather than a user error, the exception can be caught in unit tests and as such can be used as a successful test.
Methods
__construct(ValidationResult|string $result = null, string|integer $message = null, integer $code)
Construct a new ValidationException with an optional ValidationResult object
getResult()
Retrieves the ValidationResult related to this error
Details
at line 30
__construct(ValidationResult|string $result = null, string|integer $message = null, integer $code)
Construct a new ValidationException with an optional ValidationResult object
at line 57
ValidationResult
getResult()
Retrieves the ValidationResult related to this error