apache/cordova-js — pull request #82 by purplecabbage (2014-10-01 23:23:17+00:00)
Title: Cb 964 Error in success callback should generate event

Error in success callback should generate event

- exception handling code moved to common function
- a callback success with a status != cordova.callbackStatus.OK is treated as an error, and passed to the error handler, it was previously just swallowed
- exceptions are output to console.log if it exists
- exceptions are caught, and the window will fire an event `cordovacallbackerror` with a message property that contains the callbackID, and other info from the exception.
- the exception is re-thrown, so native code can also potentially respond.