Skip to content

Commit

Permalink
fix: replace deprecated 'crashed' event (#685)
Browse files Browse the repository at this point in the history
* fix: replace deprecated 'crashed' event

* chore: update exit language

* chore: add back reason
  • Loading branch information
knownasilya authored Jan 8, 2021
1 parent 85197e2 commit d5a649e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions forge/files/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ app.on('ready', async () => {
mainWindow.loadURL(emberAppURL);
});

mainWindow.webContents.on('crashed', () => {
console.log('Your Ember app (or other code) in the main window has crashed.');
console.log('This is a serious issue that needs to be handled and/or debugged.');
mainWindow.webContents.on('render-process-gone', (_event, details) => {
if (details.reason === 'killed' || details.reason === 'clean-exit') {
return;
}
console.log('Your main window process has exited unexpectedly -- see https://www.electronjs.org/docs/api/web-contents#event-render-process-gone');
console.log('Reason: ' + details.reason);
});

mainWindow.on('unresponsive', () => {
Expand Down

0 comments on commit d5a649e

Please sign in to comment.