title: Bluebird.JS Promise: new Promise(function (resolve, reject){}) vs Promise.try(function(){})
body: <p>When should I use which? Are the following the same?</p>
  
  <p>new Promise() example:</p>
  
  <pre><code>function multiRejectExample(){ 
    return new Promise(function (resolve, reject){
      if(statement){
        console.log('statement 1');
        reject(throw new Error('error'));
      }
      if(statement){
       console.log('statement 2');
       reject(throw new Error('error')); 
     }
    });
  }
  </code></pre>
  
  <p>Promise.try() example:</p>
  
  <pre><code>function tryExample(){
    return Promise.try(function(){
      if(statement){
        console.log('statement 1');
        throw new Error('error');
      }
      if(statement){
       console.log('statement 2');
       throw new Error('error'); 
     }
    });
  }
  </code></pre>