]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - lib/webtorrentProcess.js
Don't use process.exit, throw an error instead
[github/Chocobozzz/PeerTube.git] / lib / webtorrentProcess.js
index 96ebf9d023b3a48e3e0dd0c7ce5e8dd60008ccf6..7ba2dd3d9f6d1d175c7946ec88428b7b9b2d19ac 100644 (file)
@@ -5,8 +5,7 @@ function webtorrent (args) {
   var ipc = require('node-ipc')
 
   if (args.length !== 3) {
-    console.log('Wrong arguments number: ' + args.length + '/3')
-    process.exit(-1)
+    throw new Error('Wrong arguments number: ' + args.length + '/3')
   }
 
   var host = args[1]