Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace deprecated 'crashed' event #685

Merged
merged 3 commits into from
Jan 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
knownasilya marked this conversation as resolved.
Show resolved Hide resolved
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