1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

perf(core): better communication of internal exceptions

This commit is contained in:
2021-09-15 15:31:57 +02:00
parent d4888ad8fb
commit abd46aa322
4 changed files with 25 additions and 5 deletions

View File

@ -97,7 +97,16 @@ else {
app.on('ready', async () => {
mainWindow = await createMainWindow();
Menu.setApplicationMenu(null);
if (isDevelopment)
mainWindow.webContents.openDevTools();
process.on('uncaughtException', error => {
mainWindow.webContents.send('unhandled-exception', error);
});
process.on('unhandledRejection', error => {
mainWindow.webContents.send('unhandled-exception', error);
});
});
}