Fix exception log of the webtorrent process

This commit is contained in:
Chocobozzz 2016-03-19 09:08:10 +01:00
parent 8c9c1942f6
commit 233d12d8b1
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ function create (options, callback) {
}) })
ipc.server.on(processKey + '.exception', function (data) { ipc.server.on(processKey + '.exception', function (data) {
throw new Error('Received exception error from webtorrent process.' + data.exception) throw new Error('Received exception error from webtorrent process : ' + data.exception)
}) })
const webtorrent_process = spawn(pathUtils.join(__dirname, 'webtorrentProcess.js'), host, port, { detached: true }) const webtorrent_process = spawn(pathUtils.join(__dirname, 'webtorrentProcess.js'), host, port, { detached: true })

View File

@ -83,7 +83,7 @@ function webtorrent (args) {
}) })
process.on('uncaughtException', function (e) { process.on('uncaughtException', function (e) {
ipc.of[nodeKey].emit(processKey + '.exception', { exception: e }) ipc.of[nodeKey].emit(processKey + '.exception', { exception: e.toString() })
}) })
} }