From 5bd4e06cb9be72de2996699be6f3b3494daf2d28 Mon Sep 17 00:00:00 2001 From: Edwin Joassart Date: Mon, 16 Jan 2023 13:24:12 +0100 Subject: [PATCH] send exeption to console even when error reporting is off --- lib/gui/app/modules/analytics.ts | 2 +- lib/gui/etcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gui/app/modules/analytics.ts b/lib/gui/app/modules/analytics.ts index b52fbb7d..49f2e79e 100644 --- a/lib/gui/app/modules/analytics.ts +++ b/lib/gui/app/modules/analytics.ts @@ -221,9 +221,9 @@ export async function logEvent(message: string, data: AnalyticsPayload = {}) { */ export function logException(error: any) { const shouldReportErrors = settings.getSync('errorReporting'); + console.error(error); if (shouldReportErrors) { initAnalytics(); - console.error(error); SentryRenderer.captureException(error); } } diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index adb84a01..e27b0868 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -65,8 +65,8 @@ async function checkForUpdates(interval: number) { function logMainProcessException(error: any) { const shouldReportErrors = settings.getSync('errorReporting'); + console.error(error); if (shouldReportErrors) { - console.error(error); SentryMain.captureException(error); } }