Improving exception messaging for PDO using errorInfo() #5696

merged 1 commit into from Jan 8, 2014


None yet

2 participants

DragonBe commented Jan 8, 2014

Sometimes it's really annoying receiving a simple, totally not meaningful exception message like "Statement could not be executed" as there can be tons of reasons why it could not be executed.

As I've spent too much time trying to figure out what was wrong I modified this file with current change and fixed the issue immediately.

So to help fellow developers in their development I would like to offer this improvement.


@ralphschindler ralphschindler merged commit 456864d into zendframework:master Jan 8, 2014

1 check passed

default The Travis CI build passed
@ralphschindler ralphschindler added a commit that referenced this pull request Jan 8, 2014
@ralphschindler ralphschindler Forward #5696 to develop
Merge branch 'DragonBe-pdostmt-improvement' into develop

* DragonBe-pdostmt-improvement:
  Fixed formatting of Zend\Db PDO's Statement object's errorInfo handling
  Improving exception messaging for PDO using errorInfo() (see for details)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment