Better handling of JavaScript exceptions.

Their wrapper has saner message and it actually appears in stacktrace.
Merge pull request #342 from herby/js-exceptions

Better handling of JavaScript exceptions.