Send error boundary exceptions to Sentry (#2573)
parent
89607d90aa
commit
9835996d73
|
@ -2,6 +2,7 @@ import React, {Component, ErrorInfo, ReactNode} from 'react'
|
|||
import {ErrorScreen} from './error/ErrorScreen'
|
||||
import {CenteredView} from './Views'
|
||||
import {t} from '@lingui/macro'
|
||||
import {logger} from '#/logger'
|
||||
|
||||
interface Props {
|
||||
children?: ReactNode
|
||||
|
@ -23,7 +24,7 @@ export class ErrorBoundary extends Component<Props, State> {
|
|||
}
|
||||
|
||||
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
||||
console.error('Uncaught error:', error, errorInfo)
|
||||
logger.error(error, {errorInfo})
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
Loading…
Reference in New Issue