tgriesser/knex — pull request #594 by wubzz (2014-12-13 22:33:45+00:00)
Title: Add 'Error' event should a query fail.

In reference to Issue #593 , rather than requesting, figured I'd do pull request..

Tested on Postgresql, should work on rest. Purpose is to be able to listen on query errors should they occur, so that it can be used for logging purposes rather than placing your log-logic in the promise-reject/callback() functions of each Runner.query call. Convenient, and less code.

IE:
knex.on('error', myQueryErrorHandler);