Skip to content

Commit e6dd152

Browse files
committed
Swallow uncaught errors so that the renderer does not freeze
1 parent 1eefd21 commit e6dd152

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ if (IS_DEBUG) {
2727
})
2828
}
2929

30+
if (!IS_DEBUG) {
31+
// We shouldn't freeze the process when there's an error. Just ignore it.
32+
process.on('uncaughtException', function (error) {
33+
console.error(error)
34+
})
35+
}
36+
3037
process.on('SIGINT', () => app.quit())
3138

3239
let extensions = null

0 commit comments

Comments
 (0)