Skip to content

Instantly share code, notes, and snippets.

@brianr
Forked from coryvirok/gist:9478263
Created July 1, 2014 20:08
Show Gist options
  • Save brianr/4749c321ee93f1052775 to your computer and use it in GitHub Desktop.
Save brianr/4749c321ee93f1052775 to your computer and use it in GitHub Desktop.
function ignoreRemoteUncaught(isUncaught, args, payload) {
try {
var filename = payload.data.body.trace.frames[0].filename;
if (isUncaught && !filename.match(/^https?:\/\/www\.mycompany\.com/)) {
// Ignore uncaught errors that are not from www.mycompany.com.
return true;
}
} catch (e) {
// Most likely there was no filename or the frame doesn't exist.
}
return false;
}
Rollbar.configure({checkIgnore: ignoreRemoteUncaught});
// or...
_rollbarConfig({
// ...
checkIgnore: ignoreRemoteUncaught
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment