(errorType: string, source: string)
| 23 | }; |
| 24 | } |
| 25 | const trackCrash = (errorType: string, source: string) => { |
| 26 | try { |
| 27 | client.track('crash', { |
| 28 | error_type: errorType, |
| 29 | where: phase, |
| 30 | source, |
| 31 | }); |
| 32 | client.flushSync(); |
| 33 | } catch { |
| 34 | // Crash telemetry must never mask the original exception. |
| 35 | } |
| 36 | }; |
| 37 | installedUncaughtHandler = (error, origin) => { |
| 38 | if (isAbortError(error)) return; |
| 39 | trackCrash(error.name || error.constructor.name, origin); |
no test coverage detected