Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[DBAL-813] Original PDOException is preserved #534

Merged
merged 1 commit into from

4 participants

Filip Procházka doctrinebot Steve Müller Marco Pivetta
doctrinebot
Collaborator

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-823

We use Jira to track the state of pull requests and the versions they got
included in.

Steve Müller
Collaborator

Thanks :)

Marco Pivetta Ocramius merged commit 646edac into from
Filip Procházka fprochazka deleted the branch
Filip Procházka

Thank you very much!

Filip Procházka fprochazka referenced this pull request in Kdyby/Doctrine
Closed

Exceptions resolving not working correctly #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2014
  1. Filip Procházka
This page is out of date. Refresh to see the latest.
2  lib/Doctrine/DBAL/Driver/PDOException.php
View
@@ -49,7 +49,7 @@ class PDOException extends \PDOException implements DriverException
*/
public function __construct(\PDOException $exception)
{
- parent::__construct($exception->getMessage(), 0, $exception->getPrevious());
+ parent::__construct($exception->getMessage(), 0, $exception);
$this->code = $exception->getCode();
$this->errorInfo = $exception->errorInfo;
5 tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php
View
@@ -63,4 +63,9 @@ public function testReturnsSQLState()
{
$this->assertSame(self::SQLSTATE, $this->exception->getSQLState());
}
+
+ public function testOriginalExceptionIsInChain()
+ {
+ $this->assertSame($this->wrappedExceptionMock, $this->exception->getPrevious());
+ }
}
Something went wrong with that request. Please try again.