Skip to content

Commit

Permalink
[Fix] Log the full error in the uncaughtException handler (#3904)
Browse files Browse the repository at this point in the history
Log the full error in the uncaughtException handler
  • Loading branch information
CommandMC authored Aug 9, 2024
1 parent 59873b0 commit 8652fb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,13 @@ ipcMain.once('frontendReady', () => {

// Maybe this can help with white screens
process.on('uncaughtException', async (err) => {
logError(`${err.name}: ${err.message}`, LogPrefix.Backend)
logError(err, LogPrefix.Backend)

// We might get "object has been destroyed" exceptions in CI, since we start
// and close Heroic quickly there. Displaying an error box would lock up
// the test (until the timeout is reached), so let's not do that
if (process.env.CI === 'e2e') return

showDialogBoxModalAuto({
title: i18next.t(
'box.error.uncaught-exception.title',
Expand Down

0 comments on commit 8652fb9

Please sign in to comment.