DatabaseException
extends InfrastructureException
in package
FinalYes
Collection of various database exceptions
Table of Contents
Properties
- $errorCode : string
- $httpStatusCode : int
Methods
- __construct() : mixed
- connectionFailed() : self
- emptyDeleteConditions() : self
- emptyUpdateData() : self
- executionFailed() : self
- invalidColumns() : self
- invalidDsn() : self
- parameterBindingFailed() : self
- unsupportedDriver() : self
Properties
$errorCode read-only
public
string
$errorCode
= "INFRASTRUCTURE_ERROR"
$httpStatusCode read-only
public
int
$httpStatusCode
= 500
Methods
__construct()
public
__construct(string $message[, string $errorCode = "INFRASTRUCTURE_ERROR" ][, int $httpStatusCode = 500 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string
- $errorCode : string = "INFRASTRUCTURE_ERROR"
- $httpStatusCode : int = 500
- $previous : Throwable|null = null
connectionFailed()
public
static connectionFailed(string $dsn, Throwable $previous) : self
Parameters
- $dsn : string
- $previous : Throwable
Return values
selfemptyDeleteConditions()
public
static emptyDeleteConditions() : self
Return values
selfemptyUpdateData()
public
static emptyUpdateData() : self
Return values
selfexecutionFailed()
public
static executionFailed(string $query, Throwable $previous) : self
Parameters
- $query : string
- $previous : Throwable
Return values
selfinvalidColumns()
public
static invalidColumns(string $table[, array<string|int, mixed> $invalidColumns = [] ]) : self
Parameters
- $table : string
- $invalidColumns : array<string|int, mixed> = []
Return values
selfinvalidDsn()
public
static invalidDsn(string $dsn) : self
Parameters
- $dsn : string
Return values
selfparameterBindingFailed()
public
static parameterBindingFailed(string $key, Throwable $previous) : self
Parameters
- $key : string
- $previous : Throwable
Return values
selfunsupportedDriver()
public
static unsupportedDriver(string $driver) : self
Parameters
- $driver : string