Skip to content

Instantly share code, notes, and snippets.

@andrewtamura
Last active June 28, 2016 07:58
Show Gist options
  • Save andrewtamura/971416c485d0cd2311382c9c38571d3b to your computer and use it in GitHub Desktop.
Save andrewtamura/971416c485d0cd2311382c9c38571d3b to your computer and use it in GitHub Desktop.
Multiple code paths with culprit
var raven = require('./raven');
function foo() {
try {
thowsException();
} catch (err) {
raven.captureException(err, {
culprit: 'Error from thowsException in foo'
});
}
}
function bar() {
try {
thowsException();
} catch (err) {
raven.captureException(err, {
culprit: 'Error from thowsException in bar'
});
}
}
function thowsException() {
throw new Error('Generic Error');
}
foo();
bar();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment