Improving exception messaging for PDO using errorInfo() #5696

Merged
merged 1 commit into from Jan 8, 2014

Projects

None yet

2 participants

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

Michelangelo

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

1 check passed

default The Travis CI build passed
Details
@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 http://www.php.net/manual/en/pdo.errorinfo.php for details)
126381d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment