From 92caf2f204fc5d06269efbecc08ec1c5c2d5dcf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Sun, 6 Apr 2014 18:01:13 +0200 Subject: [PATCH] lt: better error handling Let node handle the displaying of error and setting exit code. --- bin/client | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/client b/bin/client index 2a5888a..291bb7f 100755 --- a/bin/client +++ b/bin/client @@ -27,14 +27,13 @@ var opt = { lt_client(opt.port, opt, function(err, tunnel) { if (err) { - console.error(err); - return process.exit(1); + throw err; } console.log('your url is: %s', tunnel.url); tunnel.on('error', function(err) { - console.error(err); + throw err; }); });