File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -185,16 +185,9 @@ export class Hub implements HubInterface {
185185 // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
186186 public captureException ( exception : any , hint ?: EventHint ) : string {
187187 const eventId = ( this . _lastEventId = hint && hint . event_id ? hint . event_id : uuid4 ( ) ) ;
188-
189- let syntheticException : Error ;
190- try {
191- throw new Error ( 'Sentry syntheticException' ) ;
192- } catch ( exception ) {
193- syntheticException = exception as Error ;
194- }
195188 this . _invokeClient ( 'captureException' , exception , {
196189 originalException : exception ,
197- syntheticException,
190+ syntheticException : new Error ( 'Sentry syntheticException' ) ,
198191 ...hint ,
199192 event_id : eventId ,
200193 } ) ;
@@ -211,17 +204,9 @@ export class Hub implements HubInterface {
211204 hint ?: EventHint ,
212205 ) : string {
213206 const eventId = ( this . _lastEventId = hint && hint . event_id ? hint . event_id : uuid4 ( ) ) ;
214-
215- let syntheticException : Error ;
216- try {
217- throw new Error ( 'Sentry syntheticException' ) ;
218- } catch ( exception ) {
219- syntheticException = exception as Error ;
220- }
221-
222207 this . _invokeClient ( 'captureMessage' , message , level , {
223208 originalException : message ,
224- syntheticException,
209+ syntheticException : new Error ( 'Sentry syntheticException' ) ,
225210 ...hint ,
226211 event_id : eventId ,
227212 } ) ;
You can’t perform that action at this time.
0 commit comments