Fixing error code on DBALException (forwarding SQL Error Code). #336

Closed
wants to merge 1 commit into from

2 participants

@naroga

'0' was the previous hardcoded error code. I'm just forwarding whatever SQL Error code might occur during a query.

Previous to this fix, we'd have to check for whatever Exception was thrown before DBALException in order to get the error code.

Useful when trying to come up with user-friendly error messages.

@Ocramius
Doctrine member

The error code should be specific to the DBAL itself (assuming there is such an error code), and not to the underlying exception.

@Ocramius Ocramius closed this Jun 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment