Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/raven.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,10 @@ Raven.prototype = {

if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
var ex;
// create a stack trace from this point; just trim
// off extra frames so they don't include this function call (or
// earlier Raven.js library fn calls)
// Generate a "synthetic" stack trace from this point.
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
// of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
// or if it catches a thrown object without a "stack" property.
try {
throw new Error(msg);
} catch (ex1) {
Expand All @@ -408,6 +409,9 @@ Raven.prototype = {
// fingerprint on msg, not stack trace (legacy behavior, could be
// revisited)
fingerprint: msg,
// since we know this is a synthetic trace, the top N-most frames
// MUST be from Raven.js, so mark them as in_app later by setting
// trimHeadFrames
trimHeadFrames: (options.trimHeadFrames || 0) + 1
}, options);

Expand Down