robotpony/Presto — pull request #86 by ngallagher87 (2013-09-11 23:48:19+00:00)
Title: Adding a more detailed error for PDO bindings

Firstly, I'd like to point out that I screwed up the branch name... :sweat_smile: My bad.
* * *
This is a pretty simple addition - if a PDO binding error occurred, this outputs a more helpful error message.

Basically, `HY093` means that you don't have your binding values matched up to your SQL:

$sql = <<db->insert($sql, array('thing' => 'apple', 'coolerThng' => 'fighterJet'); // misspelled :coolerThing

Getting the `HY093` instead of the generic error (`Update failed for unknown reason.`) helps point out that you missed/misspelled a binding, and it also gives the user something to search.

This is just something that I've been using for the past month or so and it's helped speed debugging along in a few cases.