PDOException
extends PDOException
in package
implements
DriverException
Tiny wrapper for PDOException instances to implement the {@link DriverException} interface.
Tags
Interfaces, Classes and Traits
- DriverException
- Contract for a driver exception.
Table of Contents
- $errorCode : int|string|null
- The driver specific error code.
- $sqlState : string|null
- The SQLSTATE of the driver.
- __construct() : mixed
- Constructor.
- getErrorCode() : int|string|null
- Returns the driver specific error code if available.
- getSQLState() : string|null
- Returns the SQLSTATE the driver was in at the time the error occurred.
Properties
$errorCode
The driver specific error code.
private
int|string|null
$errorCode
$sqlState
The SQLSTATE of the driver.
private
string|null
$sqlState
Methods
__construct()
Constructor.
public
__construct(PDOException $exception) : mixed
Parameters
- $exception : PDOException
-
The PDO exception to wrap.
Return values
mixed —getErrorCode()
Returns the driver specific error code if available.
public
getErrorCode() : int|string|null
Return values
int|string|null —getSQLState()
Returns the SQLSTATE the driver was in at the time the error occurred.
public
getSQLState() : string|null