Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
646edacd
Commit
646edacd
authored
Feb 23, 2014
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #534 from fprochazka/preserve-original-pdo-exception
[DBAL-813] Original PDOException is preserved
parents
3c3a4b14
8d70cc73
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
PDOException.php
lib/Doctrine/DBAL/Driver/PDOException.php
+1
-1
PDOExceptionTest.php
tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php
+5
-0
No files found.
lib/Doctrine/DBAL/Driver/PDOException.php
View file @
646edacd
...
...
@@ -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
;
...
...
tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php
View file @
646edacd
...
...
@@ -63,4 +63,9 @@ class PDOExceptionTest extends DbalTestCase
{
$this
->
assertSame
(
self
::
SQLSTATE
,
$this
->
exception
->
getSQLState
());
}
public
function
testOriginalExceptionIsInChain
()
{
$this
->
assertSame
(
$this
->
wrappedExceptionMock
,
$this
->
exception
->
getPrevious
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment