abstract class AbstractDriverException extends Exception implements DriverException (View source)

Abstract base implementation of the {@link DriverException} interface.

Methods

__construct(string $message, string|null $sqlState = null, integer|string|null $errorCode = null)

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(string $message, string|null $sqlState = null, integer|string|null $errorCode = null)

Constructor.

Parameters

string $message The driver error message.
string|null $sqlState The SQLSTATE the driver is in at the time the error occured, if any.
integer|string|null $errorCode The driver specific error code if any.

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