1- import { getCurrentHub , withScope } from '@sentry/core' ;
1+ import { captureException , getCurrentHub , withScope } from '@sentry/core' ;
22import { Mechanism , SentryEvent , SentryWrappedFunction } from '@sentry/types' ;
33import { isFunction } from '@sentry/utils/is' ;
44import { htmlTreeAsString } from '@sentry/utils/misc' ;
@@ -57,7 +57,7 @@ export function wrap(
5757 return fn ;
5858 }
5959
60- const wrapped : SentryWrappedFunction = function ( this : any ) : void {
60+ const sentryWrapped : SentryWrappedFunction = function ( this : any ) : void {
6161 if ( before && isFunction ( before ) ) {
6262 before . apply ( this , arguments ) ;
6363 }
@@ -96,7 +96,7 @@ export function wrap(
9696 return processedEvent ;
9797 } ) ;
9898
99- getCurrentHub ( ) . captureException ( ex , { originalException : ex } ) ;
99+ captureException ( ex ) ;
100100 } ) ;
101101
102102 throw ex ;
@@ -108,20 +108,20 @@ export function wrap(
108108 try {
109109 for ( const property in fn ) {
110110 if ( Object . prototype . hasOwnProperty . call ( fn , property ) ) {
111- wrapped [ property ] = fn [ property ] ;
111+ sentryWrapped [ property ] = fn [ property ] ;
112112 }
113113 }
114114 } catch ( _oO ) { } // tslint:disable-line:no-empty
115115
116- wrapped . prototype = fn . prototype ;
117- fn . __sentry_wrapped__ = wrapped ;
116+ sentryWrapped . prototype = fn . prototype ;
117+ fn . __sentry_wrapped__ = sentryWrapped ;
118118
119119 // Signal that this function has been wrapped/filled already
120120 // for both debugging and to prevent it to being wrapped/filled twice
121- wrapped . __sentry__ = true ;
122- wrapped . __sentry_original__ = fn ;
121+ sentryWrapped . __sentry__ = true ;
122+ sentryWrapped . __sentry_original__ = fn ;
123123
124- return wrapped ;
124+ return sentryWrapped ;
125125}
126126
127127/**
0 commit comments