Fixes #12. Add on-error event for error handling.
Merge pull request #13 from Polymer/issue-12-error-handling

Fixes #12. Add on-error event for error handling.