4 ms·
You can do this pretty easily without a third-party by just using window.onerror, and then doing an ajax request to log it.
by dstein 15y ago
You can do this pretty easily without a third-party by just using window.onerror, and then doing an ajax request to log it.
- unignorant 15y agoNot necessarily -- window.onerror isn't fully supported by some browsers and libraries: http://blog.proxino.com/post/8388203148/catching-the-worlds-bugs-instrumentation-via-proxy http://blog.proxino.com/post/8388203148/catching-the-worlds-...
- dstein 15y agoYeah and just as easily you can put a try/catch around your code and do the same ajax logging.
- zaveri 15y agoSure, that is possible if you want to spend the time wrapping every function in your code with a try/catch block. Most people don't, and so we provide automatic code instrumentation. You can't just wrap your js file in a single try/catch.