4 ms·
Suggesting TraceKit is pretty much: "In order to get stack traces, you need to wrap your code in a try/catch block like above. Otherwise the error hits window.
by NKCSS 13y ago
Suggesting TraceKit is pretty much:
"In order to get stack traces, you need to wrap your code in a try/catch block like above. Otherwise the error hits window.onerror handler and will only contain the error message, line number, and column number."
TraceKit doesn't do this for you; you still need to wrap in try/catch, so you might as well just do that and have the error/stack trace there.
- robocat 13y agoIf using jQuery, it is a few lines of code to add try/catch around the majority of your code entry points. Go to https://github.com/getsentry/raven-js/blob/master/dist/1.0.8/raven.js https://github.com/getsentry/raven-js/blob/master/dist/1.0.8... and you will see code that wraps $.event.add(), $.fn.ready(), $.ajax(), window.setTimeout() and window.setInterval() (search _helper).