Fixing uncaught exception on window close
This commit is contained in:
parent
a419fe75ca
commit
9120774c00
1 changed files with 6 additions and 2 deletions
|
@ -465,6 +465,10 @@ ipcMain.on('ELECTRON_BROWSER_WINDOW_CONFIRM', function (event, message, title) {
|
||||||
|
|
||||||
// Implements window.close()
|
// Implements window.close()
|
||||||
ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
||||||
event.sender.getOwnerBrowserWindow().close()
|
try {
|
||||||
event.returnValue = null
|
event.sender.getOwnerBrowserWindow().close()
|
||||||
|
event.returnValue = null
|
||||||
|
} catch (error) {
|
||||||
|
event.returnValue = exceptionToMeta(error)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue