1
- import { getCurrentHub , withScope } from '@sentry/core' ;
1
+ import { captureException , getCurrentHub , withScope } from '@sentry/core' ;
2
2
import { Mechanism , SentryEvent , SentryWrappedFunction } from '@sentry/types' ;
3
3
import { isFunction } from '@sentry/utils/is' ;
4
4
import { htmlTreeAsString } from '@sentry/utils/misc' ;
@@ -57,7 +57,7 @@ export function wrap(
57
57
return fn ;
58
58
}
59
59
60
- const wrapped : SentryWrappedFunction = function ( this : any ) : void {
60
+ const sentryWrapped : SentryWrappedFunction = function ( this : any ) : void {
61
61
if ( before && isFunction ( before ) ) {
62
62
before . apply ( this , arguments ) ;
63
63
}
@@ -96,7 +96,7 @@ export function wrap(
96
96
return processedEvent ;
97
97
} ) ;
98
98
99
- getCurrentHub ( ) . captureException ( ex , { originalException : ex } ) ;
99
+ captureException ( ex ) ;
100
100
} ) ;
101
101
102
102
throw ex ;
@@ -108,20 +108,20 @@ export function wrap(
108
108
try {
109
109
for ( const property in fn ) {
110
110
if ( Object . prototype . hasOwnProperty . call ( fn , property ) ) {
111
- wrapped [ property ] = fn [ property ] ;
111
+ sentryWrapped [ property ] = fn [ property ] ;
112
112
}
113
113
}
114
114
} catch ( _oO ) { } // tslint:disable-line:no-empty
115
115
116
- wrapped . prototype = fn . prototype ;
117
- fn . __sentry_wrapped__ = wrapped ;
116
+ sentryWrapped . prototype = fn . prototype ;
117
+ fn . __sentry_wrapped__ = sentryWrapped ;
118
118
119
119
// Signal that this function has been wrapped/filled already
120
120
// 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 ;
123
123
124
- return wrapped ;
124
+ return sentryWrapped ;
125
125
}
126
126
127
127
/**
0 commit comments