Added missing onError handler.

Without this function it was impossible to catch a Parser Error.
Right, sorry for that. Just added the coffee script version with tests.