ExceptionConverterDriver
in
Contract for a driver that is capable of converting DBAL driver exceptions into standardized DBAL driver exceptions.
Tags
Table of Contents
- convertException() : DriverException
- Converts a given DBAL driver exception into a standardized DBAL driver exception.
Methods
convertException()
Converts a given DBAL driver exception into a standardized DBAL driver exception.
public
convertException(string $message, DriverException $exception) : DriverException
It evaluates the vendor specific error code and SQLSTATE and transforms it into a unified subclass.
Parameters
- $message : string
-
The DBAL exception message to use.
- $exception : DriverException
-
The DBAL driver exception to convert.
Return values
DriverException —An instance of one of the DriverException subclasses.