@@ -2,7 +2,7 @@ import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
22import { Event , EventHint , Exception , ExtendedError , Integration } from '@sentry/types' ;
33
44import { exceptionFromStacktrace } from '../parsers' ;
5- import { computeStackTrace } from '../tracekit' ;
5+ import { _computeStackTrace } from '../tracekit' ;
66
77const DEFAULT_KEY = 'cause' ;
88const DEFAULT_LIMIT = 5 ;
@@ -44,7 +44,7 @@ export class LinkedErrors implements Integration {
4444 addGlobalEventProcessor ( ( event : Event , hint ?: EventHint ) => {
4545 const self = getCurrentHub ( ) . getIntegration ( LinkedErrors ) ;
4646 if ( self ) {
47- return self . handler ( event , hint ) ;
47+ return self . _handler ( event , hint ) ;
4848 }
4949 return event ;
5050 } ) ;
@@ -53,24 +53,24 @@ export class LinkedErrors implements Integration {
5353 /**
5454 * @inheritDoc
5555 */
56- public handler ( event : Event , hint ?: EventHint ) : Event | null {
56+ private _handler ( event : Event , hint ?: EventHint ) : Event | null {
5757 if ( ! event . exception || ! event . exception . values || ! hint || ! ( hint . originalException instanceof Error ) ) {
5858 return event ;
5959 }
60- const linkedErrors = this . walkErrorTree ( hint . originalException , this . _key ) ;
60+ const linkedErrors = this . _walkErrorTree ( hint . originalException , this . _key ) ;
6161 event . exception . values = [ ...linkedErrors , ...event . exception . values ] ;
6262 return event ;
6363 }
6464
6565 /**
6666 * @inheritDoc
6767 */
68- public walkErrorTree ( error : ExtendedError , key : string , stack : Exception [ ] = [ ] ) : Exception [ ] {
68+ private _walkErrorTree ( error : ExtendedError , key : string , stack : Exception [ ] = [ ] ) : Exception [ ] {
6969 if ( ! ( error [ key ] instanceof Error ) || stack . length + 1 >= this . _limit ) {
7070 return stack ;
7171 }
72- const stacktrace = computeStackTrace ( error [ key ] ) ;
72+ const stacktrace = _computeStackTrace ( error [ key ] ) ;
7373 const exception = exceptionFromStacktrace ( stacktrace ) ;
74- return this . walkErrorTree ( error [ key ] , key , [ exception , ...stack ] ) ;
74+ return this . _walkErrorTree ( error [ key ] , key , [ exception , ...stack ] ) ;
7575 }
7676}
0 commit comments