From 47d62df1a205789574bd3c8e06af0fdc07322306 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Wed, 23 Nov 2022 01:18:36 +0100 Subject: added more user friendly error message When JavaScript errors occur outside of the renderer, they'll no longer display a big and confusingly detailed error stack, now they'll simply be shown a toast about the fact that an error happened. The user can then click this to get more details, but still without it being as invasive and obtuse as before. --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 02a7a60..ba08056 100644 --- a/src/index.js +++ b/src/index.js @@ -74,6 +74,11 @@ function start() { ipcMain.on("installed-mod", (event, modname) => {send("installed-mod", modname)}); ipcMain.on("no-internet", () => {send("no-internet")}); + process.on("uncaughtException", (err) => { + send("unknown-error", err); + console.error(err); + }); + // install calls ipcMain.on("install-from-path", (event, path) => {utils.mods.install(path)}); ipcMain.on("install-from-url", (event, url) => {utils.mods.installFromURL(url)}); -- cgit v1.2.3