mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Catch unhandled errors in the electron process
Otherwise we pop up stack traces in dialog boxes if it fails to to poll for updates or something.
This commit is contained in:
parent
e033ce6c43
commit
b223d3b385
1 changed files with 10 additions and 0 deletions
|
@ -91,6 +91,16 @@ function pollForUpdates() {
|
|||
}
|
||||
}
|
||||
|
||||
// handle uncaught errors otherwise it displays
|
||||
// stack traces in popup dialogs, which is terrible (which
|
||||
// it will do any time the auto update poke fails, and there's
|
||||
// no other way to catch this error).
|
||||
// Assuming we generally run from the console when developing,
|
||||
// this is far preferable.
|
||||
process.on('uncaughtException', function (error) {
|
||||
console.log("Unhandled exception", error);
|
||||
});
|
||||
|
||||
electron.ipcMain.on('install_update', installUpdate);
|
||||
|
||||
electron.app.on('ready', () => {
|
||||
|
|
Loading…
Reference in a new issue