No need to clutter your code with a bunch of try wrappers like this suggests. There's a much better way. It turns out that in a typical web app, a handful of operations account for the vast majority of new execution contexts:
Wrap those entry points (along with a single top-level wrapper which can be done as a build step) and you're almost entirely covered. If you use jQuery along with TraceKit, this plugin does it for you: https://github.com/getsentry/raven-js/blob/master/plugins/jq...