Taazr: Optimize and Monitor your Javascript
taazr.com
taazr.com
- It sends a good deal of information it can find out about the browser and where in the uncompressed code the error occured (it does this by you feeding it the original js file, unmodified, to their proxy service).
- Before minifying and compressing your scripts, it wraps every function it can find in a try/catch, and wraps the entire script's contents in a try/catch as well.
- As such, I don't believe it can correctly catch syntax errors.
I've done something similar that sends error logs to a Sentry error handler in my Django-based websites. It's definitely handy to be able to catch and fix javascript errors as they happen live, before clients even report or notice something is wrong. Quite a handy tool to have in addition to automated testing (with something like Qunit) and Selenium.
A `try/catch` is most expensive when used in a deep function called many times. Wrapping the typical "click" handler isn't going to cause performance issues. The biggest issue is that browsers have inconsistent support for stack and line info in a `try/catch` block.
Another options would be to use `window.onerror`. I've deployed apps that use the latter to report Javascript errors via the query string on an `<img>` element and it's been very useful.
I'm kind of hesitant to make my site depend entirely on some shiney new site.