File tree 2 files changed +2
-18
lines changed
2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -185,16 +185,9 @@ export class Hub implements HubInterface {
185
185
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
186
186
public captureException ( exception : any , hint ?: EventHint ) : string {
187
187
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
- }
195
188
this . _invokeClient ( 'captureException' , exception , {
196
189
originalException : exception ,
197
- syntheticException,
190
+ syntheticException : new Error ( 'Sentry syntheticException' ) ,
198
191
...hint ,
199
192
event_id : eventId ,
200
193
} ) ;
@@ -211,17 +204,9 @@ export class Hub implements HubInterface {
211
204
hint ?: EventHint ,
212
205
) : string {
213
206
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
-
222
207
this . _invokeClient ( 'captureMessage' , message , level , {
223
208
originalException : message ,
224
- syntheticException,
209
+ syntheticException : new Error ( message ) ,
225
210
...hint ,
226
211
event_id : eventId ,
227
212
} ) ;
Original file line number Diff line number Diff line change 1
1
import { getCurrentHub , getHubFromCarrier , Scope } from '../src' ;
2
-
3
2
import {
4
3
captureEvent ,
5
4
captureException ,
You can’t perform that action at this time.
0 commit comments