title: I want await to throw AggregateException, not just the first Exception
body: <p>When awaiting a faulted task (one that has an exception set), <code>await</code> will rethrow the stored exception. If the stored exception is an <code>AggregateException</code> it will rethrow the first and discard the rest.</p>
  
  <p>How can we use <code>await</code> and at the same time throw the original <code>AggregateException</code> so that we do not accidentally lose error information?</p>
  
  <p>Note, that it is of course possible to think of hacky solutions for this (e.g. try-catch around the <code>await</code>, then call <code>Task.Wait</code>). I really wish to find a clean solution. <strong>What is the best-practice here?</strong></p>
  
  <p>I thought of using a custom awaiter but the built-in <code>TaskAwaiter</code> contains lots of magic that I'm not sure how to fully reproduce. It calls internal APIs on TPL types. I also do not <em>want</em> to reproduce all of that.</p>
  
  <p>Here is a short repro if you want to play with it:</p>
  
  <pre><code>static void Main()
  {
      Run().Wait();
  }
  
  static async Task Run()
  {
      Task[] tasks = new[] { CreateTask("ex1"), CreateTask("ex2") };
      await Task.WhenAll(tasks);
  }
  
  static Task CreateTask(string message)
  {
      return Task.Factory.StartNew(() =&gt; { throw new Exception(message); });
  }
  </code></pre>
  
  <p>Only one of the two exceptions is thrown in <code>Run</code>.</p>
  
  <p>Note, that other questions on Stack Overflow do not address this specific problem. Please be careful when suggesting duplicates.</p>