Enhanced error reporting.

Enhanced the error reporting capabilities of the app. The JavaScript
code now forwards error information properly and the Pebble app is able
to read in error data and act accordingly.