diff --git a/public/electron.js b/public/electron.js index c0f1926c..d85af929 100644 --- a/public/electron.js +++ b/public/electron.js @@ -129,14 +129,18 @@ function createWindow() { autoUpdater.init(mainWindow); }); - mainWindow.webContents.on('crashed', () => { - log.info('App Crashed'); + mainWindow.webContents.on('crashed', (event) => { + log.info(`App Crashed: ${event}`); mainWindow.reload(); }); mainWindow.on("closed", () => (mainWindow = null)); } +process.on('uncaughtException',function(error){ + log.error(error); +}); + app.userAgentFallback = process.platform ==='win32' ? 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) old-airport-include/1.0.0 Chrome Electron/7.1.7 Safari/537.36';