class PDOException extends PDOException implements DriverException (View source)

Tiny wrapper for PDOException instances to implement the {@link DriverException} interface.

Methods

__construct(PDOException $exception)

Constructor.

integer|string|null
getErrorCode()

Returns the driver specific error code if available.

string|null
getSQLState()

Returns the SQLSTATE the driver was in at the time the error occurred.

Details

__construct(PDOException $exception)

Constructor.

Parameters

PDOException $exception The PDO exception to wrap.

integer|string|null getErrorCode()

Returns the driver specific error code if available.

Returns null if no driver specific error code is available for the error raised by the driver.

Return Value

integer|string|null

string|null getSQLState()

Returns the SQLSTATE the driver was in at the time the error occurred.

Returns null if the driver does not provide a SQLSTATE for the error occurred.

Return Value

string|null