From 598b627bb409a68db9844df7dce2185fbd153a2f Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 3 Apr 2023 04:13:41 -0700 Subject: [PATCH] Supress errors from main process --- src/main/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/main.ts b/src/main/main.ts index f3378475..2f1fefa5 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -40,6 +40,10 @@ export default class AppUpdater { } } +process.on('uncaughtException', (error: any) => { + console.log('Error in main process', error); +}); + if (store.get('ignore_ssl')) { app.commandLine.appendSwitch('ignore-certificate-errors'); } @@ -393,7 +397,7 @@ ipcMain.on('player-set-properties', async (_event, data: Record) => ipcMain.on( 'player-restart', async (_event, data: { extraParameters?: string[]; properties?: Record }) => { - getMpvInstance()?.quit(); + mpvInstance?.quit(); createMpv(data); }, );