[DBAL-371] DBALException doesn't forward the SQL exception code Created: 24/Oct/12 Updated: 09/May/13 Resolved: 09/May/13
|Reporter:||Matthieu Napoli||Assignee:||Benjamin Eberlei|
PDO exceptions carry the SQL error code. However DBALException doesn't forward any error code from the SQL exception.
Here is a (really poor/quick) example of usage:
I think I found where the problem is:
In return new self($msg, 0, $driverEx);, the exception is created with an error code of 0.
Is there a reason for this: is that that the driver exception may not always have a defined error code? (for example if the sql driver is not PDO or the SQL system doesn't support that, but in this case then the error code would be 0 would that be a problem?)
|Comment by Matthieu Napoli [ 24/Oct/12 ]|
Pull request here: https://github.com/doctrine/dbal/pull/221
|Comment by Doctrine Bot [ 09/May/13 ]|
A related Github Pull-Request [GH-221] was closed: