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 {
5656 'error' ,
5757 ( reason : any ) : void => {
5858 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+ } ) ;
7070 }
7171 } ,
7272 ) ;
You can’t perform that action at this time.
0 commit comments