ExceptionConverter
in
Table of Contents
Methods
- convert() : DriverException
- Converts a given driver-level exception into a DBAL-level driver exception.
Methods
convert()
Converts a given driver-level exception into a DBAL-level driver exception.
public
convert(Exception $exception, Query|null $query) : DriverException
Implementors should use the vendor-specific error code and SQLSTATE of the exception and instantiate the most appropriate specialized DriverException subclass.
Parameters
- $exception : Exception
-
The driver exception to convert.
- $query : Query|null
-
The SQL query that triggered the exception, if any.
Return values
DriverException —An instance of DriverException or one of its subclasses.