title: Promise.all getting Unhandled rejection
body: <p>I'm using Promise.all and catch error but still getting Unhandled rejection</p>
  
  <pre><code>const Promise = require('bluebird');
  
  function sleep(milis) {
  return new Promise(function(resolve, reject) {
      if (milis == 1000) {
          console.log('Rejecting millis', milis)
          setTimeout(() =&gt; {
              reject('Got error')
          }, milis);
  
      } else {
          console.log('Processing millis', milis)
          setTimeout(() =&gt; {
              resolve(milis);
          }, milis);
  
      }
  });
  }
  
  function test() {
  
  try {
      let lists = [2000, 1000, 3000]
      Promise.all(
              lists.map(record =&gt; {
                  try {
                      sleep(record)
                  } catch (err) {
                      console.log('Error inside catch block1', err)
                      throw err
                  }
              })
          ).then(data =&gt; {
              console.log('Resolved', data)
          })
          .catch(err =&gt; {
              console.log('Error inside catch block2', err)
              throw err
  
          });
  
  } catch (err) {
      console.log('Error inside catch block3', err)
  }
  }
  
  
  test();
  </code></pre>
  
  <p>After using catch block why still getting Unhandled rejection. Any help appreciated. But if I use async await not getting Unhandled rejection.</p>