title: Using Try/Catch with Promise.all
body: <p>I have recently been reading about async/await and using try and catch to handle promise rejections, and have been applying it to some of my old code.</p>
  
  <p>I have the following:</p>
  
  <pre><code>async function() {
      try {
          await Promise.all([some functions]);
          doIfNoError();
      } catch (error) {
          console.log(error);
      }
  </code></pre>
  
  <p>The functions I am passing to Promise.all follow the form:</p>
  
  <pre><code>async function() {
      some code
      if (some condition) {
          return true
      } else {
          throw false
      }
   }
  </code></pre>
  
  <p>I intend that if any of the functions passed into Promise.all reject, the rejection is displayed. If none of the functions reject, then doIfNoError should fire. However, doIfNoError sometimes fires when it shouldn't, and I am given the error "Unhandled Promise Rejection".</p>