title: Promises not catching error correctly NodeJS
body: <p>If I remember correctly Promises are supposed to catch an error when one is thrown at all times so that Promise.catch() can be used to handle that error. I don't recall any exceptions however when I throw an error inside <code>setTimeout()</code> this somehow doesn't work.</p>
  
  <p>Can someone explain why this doesn't work? Or is it simply a bug in NodeJS?</p>
  
  <p><strong>Test code</strong></p>
  
  <pre><code>// This works!
  function async() {
          return new Promise(function (resolve, reject) {
                  throw new Error('test');
          });
  }
  
  async().catch(function() {
          console.log('Ok: 1');
  });
  
  
  // This doesn't work..
  function async_fail() {
          return new Promise(function (resolve, reject) {
                  setTimeout(function() {
                          throw new Error('test');
                  }, 1);
          });
  }
  
  async_fail().catch(function() {
          console.log('Ok: 2');
  });
  </code></pre>