File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
packages/browser/src/integrations/pluggable Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,17 @@ export class Ember implements Integration {
56
56
'error' ,
57
57
( reason : any ) : void => {
58
58
if ( getCurrentHub ( ) . getIntegration ( Ember ) ) {
59
- const scope = getCurrentHub ( ) . pushScope ( ) ;
60
- if ( reason instanceof Error ) {
61
- scope . setExtra ( 'context' , 'Unhandled Promise error detected' ) ;
62
- this . addIntegrationToSdkInfo ( scope ) ;
63
- getCurrentHub ( ) . captureException ( reason , { originalException : reason } ) ;
64
- } else {
65
- scope . setExtra ( 'reason' , reason ) ;
66
- this . addIntegrationToSdkInfo ( scope ) ;
67
- captureMessage ( 'Unhandled Promise error detected' ) ;
68
- }
69
- getCurrentHub ( ) . popScope ( ) ;
59
+ withScope ( scope => {
60
+ if ( reason instanceof Error ) {
61
+ scope . setExtra ( 'context' , 'Unhandled Promise error detected' ) ;
62
+ this . addIntegrationToSdkInfo ( scope ) ;
63
+ getCurrentHub ( ) . captureException ( reason , { originalException : reason } ) ;
64
+ } else {
65
+ scope . setExtra ( 'reason' , reason ) ;
66
+ this . addIntegrationToSdkInfo ( scope ) ;
67
+ captureMessage ( 'Unhandled Promise error detected' ) ;
68
+ }
69
+ } ) ;
70
70
}
71
71
} ,
72
72
) ;
You can’t perform that action at this time.
0 commit comments