Better error hooks

Issue #11 resolved
Anonymous created an issue

Currently, if an error occurs during template binding it is outputted into the view as an error message. This works fine for development, but doesn't give any hooks for automating reporting of such occurrences.

There should be a mechanism to attach onError handler which gets called back with enough information to diagnose most template issues.