(props: ErrorBoundaryProps)
| 98 | private _cleanupHook?: () => void; |
| 99 | |
| 100 | public constructor(props: ErrorBoundaryProps) { |
| 101 | super(props); |
| 102 | |
| 103 | this.state = INITIAL_STATE; |
| 104 | this._openFallbackReportDialog = true; |
| 105 | |
| 106 | const client = getClient(); |
| 107 | if (client && props.showDialog) { |
| 108 | this._openFallbackReportDialog = false; |
| 109 | this._cleanupHook = client.on('afterSendEvent', event => { |
| 110 | if (!event.type && this._lastEventId && event.event_id === this._lastEventId) { |
| 111 | showReportDialog({ ...props.dialogOptions, eventId: this._lastEventId }); |
| 112 | } |
| 113 | }); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | public componentDidCatch(error: unknown, errorInfo: React.ErrorInfo): void { |
| 118 | const { componentStack } = errorInfo; |
nothing calls this directly
no test coverage detected