diff --git a/packages/desktop/electron/preload.js b/packages/desktop/electron/preload.js index 8babfb6625f..6c20decca7a 100644 --- a/packages/desktop/electron/preload.js +++ b/packages/desktop/electron/preload.js @@ -2,7 +2,14 @@ const { ipcRenderer, contextBridge } = require('electron') // Hook the error handlers as early as possible window.addEventListener('error', event => { - ipcRenderer.invoke('handle-error', "Preload Context Error", event.error || event) + if (event.error && event.error.message) { + ipcRenderer.invoke('handle-error', "Preload Context Error", { + message: event.error.message, + stack: event.error.stack + }) + } else { + ipcRenderer.invoke('handle-error', "Preload Context Error", event.error || event) + } event.preventDefault(); console.error(event.error || event) }) diff --git a/packages/desktop/main.js b/packages/desktop/main.js index 3ef0a71fc3e..cac5a290199 100644 --- a/packages/desktop/main.js +++ b/packages/desktop/main.js @@ -2,7 +2,14 @@ import { Electron } from 'shared/lib/electron' import App from './App.svelte' window.addEventListener('error', event => { - Electron.unhandledException("Render Context Error", event.error || event) + if (event.error && event.error.message) { + Electron.unhandledException("Render Context Error", { + message: event.error.message, + stack: event.error.stack + }) + } else { + Electron.unhandledException("Render Context Error", event.error || event) + } event.preventDefault(); console.error(event.error || event) }) diff --git a/packages/desktop/public/error.html b/packages/desktop/public/error.html index 45ab0c88eb4..d5196669801 100644 --- a/packages/desktop/public/error.html +++ b/packages/desktop/public/error.html @@ -109,14 +109,16 @@ } ::-webkit-scrollbar { - width: 8px; + width: 8px; } + ::-webkit-scrollbar-thumb { - background-color: #D8E3F5; - border-radius: 10px; + background-color: #D8E3F5; + border-radius: 10px; } + ::-webkit-scrollbar-track { - background-color: transparent; + background-color: transparent; } @@ -159,14 +161,34 @@