showclix / chatterbox

Node.js library to chat with your boxes
2 stars 0 forks source link

Display errors (specifically, timeout errors) #1

Open jarretth opened 8 years ago

jarretth commented 8 years ago
diff --git a/lib/com/connection.js b/lib/com/connection.js
index 4c4b5c3..289e01c 100644
--- a/lib/com/connection.js
+++ b/lib/com/connection.js
@@ -41,6 +41,7 @@ Connection.prototype.connect = function(host, user, pass, opts) {
     }.bind(this));
     this.c.on('error', function(err) {
       // todo handling throw Error ?
+      console.log(chalk.red('Error from ' + host + ': ' + err));
     });
     this.c.on('end', function() {});
     this.c.on('close', function(err) {
@@ -136,4 +137,4 @@ Connection.prototype._call = function() {
   });
 };

-module.exports = Connection;
\ No newline at end of file
+module.exports = Connection;
nategood commented 8 years ago

works for me