Fix exception log of the webtorrent process
authorChocobozzz <florian.bigard@gmail.com>
Sat, 19 Mar 2016 08:08:10 +0000 (09:08 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Sat, 19 Mar 2016 08:08:10 +0000 (09:08 +0100)
server/lib/webtorrent.js
server/lib/webtorrentProcess.js

index 455b086a3514a03729db3d39fe2584ad497f932b..e2e2586f9f5aa7d83ff85e547b9cf21836ebc105 100644 (file)
@@ -53,7 +53,7 @@ function create (options, callback) {
     })
 
     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 })
index c68e97ee4928a63b0321100afbaaece7511eee02..7889e7128fb3174bc4cd9f43a9b29c71b39e41d8 100644 (file)
@@ -83,7 +83,7 @@ function webtorrent (args) {
   })
 
   process.on('uncaughtException', function (e) {
-    ipc.of[nodeKey].emit(processKey + '.exception', { exception: e })
+    ipc.of[nodeKey].emit(processKey + '.exception', { exception: e.toString() })
   })
 }