diff --git a/src/raven.js b/src/raven.js index 918192ae389f..7654fee4fdf7 100644 --- a/src/raven.js +++ b/src/raven.js @@ -407,6 +407,7 @@ Raven.prototype = { * @return {Raven} */ captureException: function(ex, options) { + options = objectMerge({ trimHeadFrames: 0 }, options ? options : {}); // Cases for sending ex as a message, rather than an exception var isNotError = !isError(ex); var isNotErrorEvent = !isErrorEvent(ex); @@ -416,11 +417,11 @@ Raven.prototype = { return this.captureMessage( ex, objectMerge( + options, { - trimHeadFrames: 1, stacktrace: true // if we fall back to captureMessage, default to attempting a new trace - }, - options + trimHeadFrames: options.trimHeadFrames + 1, + } ) ); }