Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[DBAL-813] Original PDOException is preserved #534

Merged
merged 1 commit into from

4 participants

@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.

@deeky666
Collaborator

Thanks :)

@Ocramius Ocramius merged commit 646edac into doctrine:master

1 check passed

Details default The Travis CI build passed
@fprochazka fprochazka deleted the fprochazka:preserve-original-pdo-exception branch
@fprochazka

Thank you very much!

@fprochazka 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. @fprochazka
This page is out of date. Refresh to see the latest.
View
2  lib/Doctrine/DBAL/Driver/PDOException.php
@@ -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;
View
5 tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php
@@ -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.