File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,7 @@ Raven.prototype = {
408
408
* @return {Raven }
409
409
*/
410
410
captureException : function ( ex , options ) {
411
+ options = objectMerge ( { trimHeadFrames : 0 } , options ? options : { } ) ;
411
412
// Cases for sending ex as a message, rather than an exception
412
413
var isNotError = ! isError ( ex ) ;
413
414
var isNotErrorEvent = ! isErrorEvent ( ex ) ;
@@ -416,13 +417,10 @@ Raven.prototype = {
416
417
if ( ( isNotError && isNotErrorEvent ) || isErrorEventWithoutError ) {
417
418
return this . captureMessage (
418
419
ex ,
419
- objectMerge (
420
- {
421
- trimHeadFrames : 1 ,
422
- stacktrace : true // if we fall back to captureMessage, default to attempting a new trace
423
- } ,
424
- options
425
- )
420
+ objectMerge ( options , {
421
+ stacktrace : true , // if we fall back to captureMessage, default to attempting a new trace
422
+ trimHeadFrames : options . trimHeadFrames + 1
423
+ } )
426
424
) ;
427
425
}
428
426
You can’t perform that action at this time.
0 commit comments