Commit b7d63038 authored by Steve Müller's avatar Steve Müller

fix wrapping PDO exception properties

parent 70ea43a2
......@@ -51,6 +51,8 @@ class PDOException extends \PDOException implements DriverException
{
parent::__construct($exception->getMessage(), 0, $exception->getPrevious());
$this->code = $exception->getCode();
$this->errorInfo = $exception->errorInfo;
$this->errorCode = isset($exception->errorInfo[1]) ? $exception->errorInfo[1] : $exception->getCode();
$this->sqlState = isset($exception->errorInfo[0]) ? $exception->errorInfo[0] : $exception->getCode();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment