@@ -84,9 +84,11 @@ export class Try<
8484 result ?: TryResult < TReturn > ;
8585 promise ?: Promise < TryResult < TReturn > > ;
8686 isAsync ?: boolean ;
87+ finallyRan : boolean ;
88+ } ;
89+ private local : {
8790 breadcrumbData ?: Record < string , unknown > ;
8891 breadcrumbsAdded : boolean ;
89- finallyRan : boolean ;
9092 } ;
9193 private static ignoreErrorTypes : string [ ] = [ ] ;
9294 private static defaultReporter : Reporter = new NoopReporter ( ) ;
@@ -144,7 +146,8 @@ export class Try<
144146 this . fn = fn ;
145147 this . args = args ;
146148 this . config = { tags : { } } ;
147- this . exec = { state : 'pending' , breadcrumbsAdded : false , finallyRan : false } ;
149+ this . exec = { state : 'pending' , finallyRan : false } ;
150+ this . local = { breadcrumbsAdded : false } ;
148151 // Install a thenable `.then` at runtime whenever the wrapped function may
149152 // produce a Promise. `AsyncFunction` is the fast path; non-async functions
150153 // that still return a Promise are detected lazily via a getter that
@@ -833,7 +836,7 @@ export class Try<
833836 Try . defaultReporter . report ( error , {
834837 message : this . config . message ,
835838 tags : this . config . tags ,
836- breadcrumbData : this . exec . breadcrumbData ,
839+ breadcrumbData : this . local . breadcrumbData ,
837840 functionName : this . fn . name ,
838841 } ) ;
839842 }
@@ -842,18 +845,18 @@ export class Try<
842845 * Add breadcrumbs using the configured reporter if configured.
843846 */
844847 private addBreadcrumbsIfConfigured ( ) : void {
845- if ( ! this . config . breadcrumbConfig || this . exec . breadcrumbsAdded ) {
848+ if ( ! this . config . breadcrumbConfig || this . local . breadcrumbsAdded ) {
846849 return ;
847850 }
848851
849- if ( ! this . exec . breadcrumbData ) {
850- this . exec . breadcrumbData = this . extractAllBreadcrumbData ( ) ;
852+ if ( ! this . local . breadcrumbData ) {
853+ this . local . breadcrumbData = this . extractAllBreadcrumbData ( ) ;
851854 }
852855
853856 const functionName = this . fn . name || 'anonymous' ;
854857
855- Try . defaultReporter . addBreadcrumbs ( this . exec . breadcrumbData , functionName ) ;
856- this . exec . breadcrumbsAdded = true ;
858+ Try . defaultReporter . addBreadcrumbs ( this . local . breadcrumbData , functionName ) ;
859+ this . local . breadcrumbsAdded = true ;
857860 }
858861
859862 /**
0 commit comments