title: NodeJs/Bluebird - keep getting Unhandled rejection Error
body: <p>am building a daemon which listen to TCP connection > sends commands > listen for events..</p>
  
  <p>so i decided to use bluebird to get rid of all the callbacks.. but am having an issue... i cant seem to catch a rejected error.... i have no idea whats wrong here is my code</p>
  
  <p>the promise:</p>
  
  <pre><code>function exec(cmd, params, options) {
      return new Promise(function(resolve, reject) {
          server.send(cmd, params || {}, options || [], function (err, res, rawRes) {
              if (err) reject(err.msg);
              resolve(res);
          });
      });
  }
  </code></pre>
  
  <p>the execution:</p>
  
  <pre><code>exec("login", {
      // lOGIN
      client_login_name: conf.user,
      client_login_password: conf.pass
  }).then(exec("use", {
      // SELECT SERVER
      sid: 4
  })).then(exec("clientupdate", {
      // CHANGE NICKNAME
      client_nickname: conf.nick
  })).catch(function (err) {
      log.error(err);
  });
  </code></pre>
  
  <p>the error(server is not running) is the error in the <code>reject(err.msg)</code>:</p>
  
  <pre><code>Unhandled rejection Error: server is not running
  at Object.ensureErrorObject (D:\DEV\node\a90s\node_modules\bluebird\js\main\util.js:261:20)
  at Promise._rejectCallback (D:\DEV\node\a90s\node_modules\bluebird\js\main\promise.js:465:22)
  at D:\DEV\node\a90s\node_modules\bluebird\js\main\promise.js:482:17
  at Object.cb (D:\DEV\node\a90s\modules\ts3interface.js:20:26)
  at LineInputStream.&lt;anonymous&gt; (D:\DEV\node\a90s\node_modules\node-teamspeak\index.js:170:47)
  at LineInputStream.emit (events.js:107:17)
  at LineInputStream._events.line (D:\DEV\node\a90s\node_modules\node-teamspeak\node_modules\line-input-stream\lib\line-input-stream.js:8:8)
  at Array.forEach (native)
  at Socket.&lt;anonymous&gt; (D:\DEV\node\a90s\node_modules\node-teamspeak\node_modules\line-input-stream\lib\line-input-stream.js:36:9)
  at Socket.emit (events.js:107:17)
  at readableAddChunk (_stream_readable.js:163:16)
  at Socket.Readable.push (_stream_readable.js:126:10)
  at TCP.onread (net.js:538:20)
  </code></pre>
  
  <p>Thanks in advance :)</p>