Skip to content

Commit

Permalink
Improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Sep 29, 2017
1 parent ca37549 commit 905f2d4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function createMainWindow() {
e.preventDefault();
});

tuskWindow.on('unresponsive', e => {
console.log('Unresponsive Tusk window. ', e);
});

tuskWindow.webContents.on('did-navigate-in-page', (e, url) => {
config.set('lastURL', url);
});
Expand Down Expand Up @@ -116,6 +120,10 @@ app.on('ready', () => {
electron.shell.openExternal(url);
});

windowContent.on('crashed', e => {
console.log('Tusk window crashed. ', e);
});

update.init(electron.Menu.getApplicationMenu());

if (!isDevMode) {
Expand Down Expand Up @@ -209,6 +217,11 @@ ipcMain.on('export-as-pdf', event => {
});
});

process.on('uncaughtException', error => {
// Report uncaught exceptions
console.log(error);
});

app.on('activate', () => {
mainWindow.show();
});
Expand Down

0 comments on commit 905f2d4

Please sign in to comment.