From 690520616cf572cea4360221b02143e1eedf9f04 Mon Sep 17 00:00:00 2001 From: nig Date: Thu, 5 Jan 2023 13:59:42 +0100 Subject: [PATCH] fix trying to log the stack of an undefined error we're receiving reports for calls of the uncaught error handler where the error is undefined from safari users. moving the log into the try to get a log message with a stack instead of another uncaught error when this happens. close #4932 --- src/misc/ErrorHandler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/misc/ErrorHandler.ts b/src/misc/ErrorHandler.ts index 76da88d530a..3d824bb76b1 100644 --- a/src/misc/ErrorHandler.ts +++ b/src/misc/ErrorHandler.ts @@ -45,9 +45,8 @@ export async function handleUncaughtError(e: Error) { throw e } - console.log("error", e, e.stack) - try { + console.log("error", e, e.stack) const { handleUncaughtErrorImpl } = await importErrorHandler() await handleUncaughtErrorImpl(e) } catch (e) {