diff options
author | 0neGal <mail@0negal.com> | 2022-11-23 01:18:36 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-11-23 01:18:36 +0100 |
commit | 47d62df1a205789574bd3c8e06af0fdc07322306 (patch) | |
tree | a182ebf001e3eb6ba7bb155cba5393f94d7835e4 /src/index.js | |
parent | a12c73e95f7de4167d4e20f77d5e942f1e12d179 (diff) | |
download | Viper-47d62df1a205789574bd3c8e06af0fdc07322306.tar.gz Viper-47d62df1a205789574bd3c8e06af0fdc07322306.zip |
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.
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
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)}); |