diff --git a/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php b/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php index dd59c9e06..fdc2cf825 100644 --- a/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php +++ b/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php @@ -12,6 +12,7 @@ class PDOExceptionWithQueryString extends PDOException { public function __construct(PDOException $e) { parent::__construct($e->getMessage(), 0, $e->getPrevious()); + $this->errorInfo = $e->errorInfo; $this->code = $e->code; } }