<?php declare(strict_types=1); namespace Doctrine\DBAL\Driver\PDO; use Doctrine\DBAL\Driver\AbstractException; use PDOException; /** * @internal * * @psalm-immutable */ final class Exception extends AbstractException { public static function new(PDOException $exception): self { if ($exception->errorInfo !== null) { [$sqlState, $code] = $exception->errorInfo; $code ??= 0; } else { $code = $exception->getCode(); $sqlState = null; } return new self($exception->getMessage(), $sqlState, $code, $exception); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
MySQL | Folder | 0755 |
|
|
OCI | Folder | 0755 |
|
|
PgSQL | Folder | 0755 |
|
|
SQLSrv | Folder | 0755 |
|
|
SQLite | Folder | 0755 |
|
|
Connection.php | File | 3.89 KB | 0644 |
|
Exception.php | File | 617 B | 0644 |
|
PDOException.php | File | 711 B | 0644 |
|
ParameterTypeMap.php | File | 1.07 KB | 0644 |
|
Result.php | File | 2.43 KB | 0644 |
|
Statement.php | File | 3.67 KB | 0644 |
|