Automatic error reporting (#7046)

* Enable sentry global handlers if automaticErrorReporting is on

* Pass the exception through on session restore error

Passing the exception object itself through to the BugReportDialog means a stack trace can be correctly recorded in Sentry
This commit is contained in:
James Salter 2021-10-29 09:34:25 +01:00 committed by GitHub
parent d0bb6e0657
commit 3defb863b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 12 deletions

View file

@ -28,13 +28,15 @@ import DialogButtons from "../elements/DialogButtons";
import { IDialogProps } from "./IDialogProps";
interface IProps extends IDialogProps {
error: string;
error: Error;
}
@replaceableComponent("views.dialogs.SessionRestoreErrorDialog")
export default class SessionRestoreErrorDialog extends React.Component<IProps> {
private sendBugReport = (): void => {
Modal.createTrackedDialog('Session Restore Error', 'Send Bug Report Dialog', BugReportDialog, {});
Modal.createTrackedDialog('Session Restore Error', 'Send Bug Report Dialog', BugReportDialog, {
error: this.props.error,
});
};
private onClearStorageClick = (): void => {