Documentation

ExceptionConverterDriver

Contract for a driver that is capable of converting DBAL driver exceptions into standardized DBAL driver exceptions.

Tags
author

Benjamin Eberlei kontakt@beberlei.de

author

Steve Müller st.mueller@dzh-online.de

link
www.doctrine-project.org
since
2.5

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.

Search results