title: Promise.try without bluebird
body: <p>I am trying to re-create bluebird's promise.try function, is this essentially the same?</p>
  
  <pre><code>function promiseTry(callback) {
    let error;
    let value;
    try {
      value = callback();
    } catch (e) {
      error = e;
    }
    return new Promise((resolve, reject) =&gt; {
      if (error) {
        reject(error);
        throw error;
      }
      resolve(value);
    });
  }
  
  const x = promiseTry(() =&gt; {
    throw new Error('hi');
  });
  </code></pre>
  
  <p>How can I simply implement bluebird's <code>Promise.try</code> with a native node Promise?</p>