Documentation

ValidationException extends Exception
in package

Exception thrown to indicate a validation error.

Table of Contents

Properties

$_exceptionData  : mixed
Additional data associated with the exception.

Methods

__construct()  : mixed
Constructs a ValidationException.
getExceptionData()  : mixed
Retrieves the additional data associated with the exception.
getExceptionDataAsArray()  : array<string|int, mixed>
Retrieves the additional data associated with the exception as an array.
Log()  : void
Logs the exception.

Properties

$_exceptionData

Additional data associated with the exception.

private mixed $_exceptionData = null

Methods

__construct()

Constructs a ValidationException.

public __construct([string $message = "" ][, int $code = 0 ][, Throwable|null $previousException = null ][, mixed $exceptionData = null ]) : mixed
Parameters
$message : string = ""

The exception message.

$code : int = 0

The exception code.

$previousException : Throwable|null = null

The previous exception used for the exception chaining.

$exceptionData : mixed = null

Additional data associated with the exception.

getExceptionData()

Retrieves the additional data associated with the exception.

public getExceptionData() : mixed
Return values
mixed

The exception data.

getExceptionDataAsArray()

Retrieves the additional data associated with the exception as an array.

public getExceptionDataAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array containing the exception data and backtrace.

Log()

Logs the exception.

public Log(int $level) : void
Parameters
$level : int

The logging level.


        
On this page

Search results