From 0ae2e7f73c24779f8c99453fb02491382cc0520e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 2 Nov 2015 22:19:39 +0100 Subject: add robustness when we run the electron process and move the exit controller inside the main js file --- src/webtorrent.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/webtorrent.js') diff --git a/src/webtorrent.js b/src/webtorrent.js index 840f97671..18ae6b6ba 100644 --- a/src/webtorrent.js +++ b/src/webtorrent.js @@ -83,5 +83,9 @@ ipc.of[nodeKey].emit(processKey + '.ready') console.log('Ready.') }) + + process.on('uncaughtException', function (e) { + ipc.of[nodeKey].emit(processKey + '.exception', { exception: e }) + }) } })() -- cgit v1.2.3