Skip to content

Commit

Permalink
Improving exception messaging for PDO using errorInfo() (see http://w…
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonBe authored and ThaDafinser committed Mar 25, 2014
1 parent e300973 commit 8de6e01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Zend/Db/Adapter/Driver/Pdo/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ public function execute($parameters = null)
if ($this->profiler) {
$this->profiler->profilerFinish();
}
throw new Exception\InvalidQueryException('Statement could not be executed', null, $e);
throw new Exception\InvalidQueryException(
'Statement could not be executed (' . implode(' - ', $this->resource->errorInfo()) . ')', null, $e);
}

if ($this->profiler) {
Expand Down

0 comments on commit 8de6e01

Please sign in to comment.