title: await Promise.reject or throw error to bail out?
body: <p>I am refactoring my promise chaining codes to async/await style. One of the reasons to do that is I want a single catch block to handle to all error situations (as explained here <a href="https://stackoverflow.com/questions/39739491/understanding-promise-rejection-in-node-js">Understanding promise rejection in node.js</a>) </p>
  
  <p>My question is when I hit a sync error, should I call <code>await Promise.reject</code> or <code>throw error</code> to bail out the process? 
  I know either way will work but I prefer <code>throw error</code>. I already know I got an invalid result why should I await? Using throw to terminate the control flow immediately seems to be a better option.</p>
  
  <p>I am not talking about the promise chain(the whole point of my question), so I don't think the thread <a href="https://stackoverflow.com/questions/33445415/javascript-promises-reject-vs-throw]">JavaScript Promises - reject vs. throw</a> answered my question. </p>
  
  <p>I read the article <a href="https://www.joyent.com/node-js/production/design/errors" rel="nofollow noreferrer">Error Handling in Node.js</a> I don't think it gives an answer either. But it did say </p>
  
  <blockquote>
    <p>A given function should deliver operational errors either
    synchronously (with throw) or asynchronously (with a callback or event
    emitter), <strong>but not both</strong>.  ... In general, using throw and expecting
    a caller to use try/catch is pretty rare...</p>
  </blockquote>
  
  <p>My async function(s) may return Promise.reject. So I am concerned about introducing 2 ways to delivering errors as that article against.</p>
  
  <pre><code>try {
     let result = await aysncFunc().
     if (!isResultValid(result)) { //isResultValid() is sync function 
        await Promise.reject('invalid result')
        //or throw 'invalid result'
     }
     ... //further processing
  }
  catch (error) {
    ...
  }
  </code></pre>