Doctrine\DBAL\DBALException::wrapException PHP Méthode

wrapException() private static méthode

private static wrapException ( Doctrine\DBAL\Driver $driver, Exception $driverEx, $msg ) : DBALException
$driver Doctrine\DBAL\Driver
$driverEx Exception
Résultat DBALException
    private static function wrapException(Driver $driver, \Exception $driverEx, $msg)
    {
        if ($driverEx instanceof Exception\DriverException) {
            return $driverEx;
        }
        if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof Driver\DriverException) {
            return $driver->convertException($msg, $driverEx);
        }
        return new self($msg, 0, $driverEx);
    }