@@ -36,16 +36,18 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
3636 /**
3737 * @inheritdoc
3838 */
39- protected setupTransport ( ) : Transport {
40- if ( ! this . options . dsn ) {
39+ protected _setupTransport ( ) : Transport {
40+ if ( ! this . _options . dsn ) {
4141 // We return the noop transport here in case there is no Dsn.
42- return super . setupTransport ( ) ;
42+ return super . _setupTransport ( ) ;
4343 }
4444
45- const transportOptions = this . options . transportOptions ? this . options . transportOptions : { dsn : this . options . dsn } ;
45+ const transportOptions = this . _options . transportOptions
46+ ? this . _options . transportOptions
47+ : { dsn : this . _options . dsn } ;
4648
47- if ( this . options . transport ) {
48- return new this . options . transport ( transportOptions ) ;
49+ if ( this . _options . transport ) {
50+ return new this . _options . transport ( transportOptions ) ;
4951 } else if ( supportsBeacon ( ) ) {
5052 return new BeaconTransport ( transportOptions ) ;
5153 } else if ( supportsFetch ( ) ) {
@@ -65,7 +67,7 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
6567 const errorEvent = exception as ErrorEvent ;
6668 exception = errorEvent . error ; // tslint:disable-line:no-parameter-reassignment
6769 event = eventFromStacktrace ( computeStackTrace ( exception as Error ) ) ;
68- return SyncPromise . resolve ( this . buildEvent ( event , hint ) ) ;
70+ return SyncPromise . resolve ( this . _buildEvent ( event , hint ) ) ;
6971 } else if ( isDOMError ( exception as DOMError ) || isDOMException ( exception as DOMException ) ) {
7072 // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)
7173 // then we just extract the name and message, as they don't provide anything else
@@ -77,12 +79,12 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
7779
7880 return this . eventFromMessage ( message , Severity . Error , hint ) . then ( messageEvent => {
7981 addExceptionTypeValue ( messageEvent , message ) ;
80- return SyncPromise . resolve ( this . buildEvent ( messageEvent , hint ) ) ;
82+ return SyncPromise . resolve ( this . _buildEvent ( messageEvent , hint ) ) ;
8183 } ) ;
8284 } else if ( isError ( exception as Error ) ) {
8385 // we have a real Error object, do nothing
8486 event = eventFromStacktrace ( computeStackTrace ( exception as Error ) ) ;
85- return SyncPromise . resolve ( this . buildEvent ( event , hint ) ) ;
87+ return SyncPromise . resolve ( this . _buildEvent ( event , hint ) ) ;
8688 } else if ( isPlainObject ( exception as { } ) && hint && hint . syntheticException ) {
8789 // If it is plain Object, serialize it manually and extract options
8890 // This will allow us to group events based on top-level keys
@@ -94,7 +96,7 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
9496 synthetic : true ,
9597 type : 'generic' ,
9698 } ) ;
97- return SyncPromise . resolve ( this . buildEvent ( event , hint ) ) ;
99+ return SyncPromise . resolve ( this . _buildEvent ( event , hint ) ) ;
98100 }
99101
100102 // If none of previous checks were valid, then it means that
@@ -110,14 +112,14 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
110112 synthetic : true ,
111113 type : 'generic' ,
112114 } ) ;
113- return SyncPromise . resolve ( this . buildEvent ( messageEvent , hint ) ) ;
115+ return SyncPromise . resolve ( this . _buildEvent ( messageEvent , hint ) ) ;
114116 } ) ;
115117 }
116118
117119 /**
118120 * This is an internal helper function that creates an event.
119121 */
120- private buildEvent ( event : Event , hint ?: EventHint ) : Event {
122+ private _buildEvent ( event : Event , hint ?: EventHint ) : Event {
121123 return {
122124 ...event ,
123125 event_id : hint && hint . event_id ,
@@ -134,7 +136,7 @@ export class BrowserBackend extends BaseBackend<BrowserOptions> {
134136 message,
135137 } ;
136138
137- if ( this . options . attachStacktrace && hint && hint . syntheticException ) {
139+ if ( this . _options . attachStacktrace && hint && hint . syntheticException ) {
138140 const stacktrace = computeStackTrace ( hint . syntheticException ) ;
139141 const frames = prepareFramesForEvent ( stacktrace . stack ) ;
140142 event . stacktrace = {
0 commit comments