3 ms·
We will add support for window.onerror eventually, but there are two reasons we haven't yet done this: 1. window.onerror gives you no backtrace 2. hooking into
by cirwin 14y ago
We will add support for window.onerror eventually, but there are two reasons we haven't yet done this:
1. window.onerror gives you no backtrace
2. hooking into jQuery.event.add lets us tell you "this error happened when the user clicked that button".
We've not yet implemented the UI for 2. (48 hours is not so long as we thought!); but I remain convinced that suitable integration with various frameworks is a much better developer experience than trying to rely on just the error message. Being able to see both the source code where the exception happened (see http://rescuejs.com/assets/screen_341.png http://rescuejs.com/assets/screen_341.png) and the user context in which it happens makes it considerably easier to fix the problem.
- laughinghan 14y agoThat sounds great, but what if, for example, you used a library that, following perfectly good practices, intentionally doesn't have external dependencies and hence doesn't use jQuery.event.add nor jQuery.fn.ready, and an exception occurs in it or a callback the page author passes to it?