Skip to content

Commit 48f1028

Browse files
authored
Merge pull request #130 from MatteoGheza/patch-2
TMP try-catch
2 parents 88b5895 + 516f527 commit 48f1028

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

main.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ function createWindow() {
3030
return false;
3131
});
3232
// start the server
33-
require("./index");
33+
try {
34+
require("./index");
35+
} catch(e) {
36+
dialog.showErrorBox("Unexpected error", "There was an unexpected error. Please open a bug report on the project's Github page or contact one of the developers. Stack Trace: " + e.toString());
37+
console.error(e);
38+
}
3439
}
3540

3641
function createTrayIcon() {
@@ -125,4 +130,4 @@ if (!gotTheLock) {
125130
app.on('window-all-closed', function () {
126131
if (process.platform !== 'darwin') app.quit();
127132
});
128-
}
133+
}

0 commit comments

Comments
 (0)