title: How to catch async void method exception?
body: <p>I have an implementation like this:</p>
  
  <pre class="lang-c# prettyprint-override"><code>Task&lt;IEnumerable&lt;Item1&gt;&gt; GetItems1() 
  {
      return RunRequest(async () =&gt; ParseItemsFromResponse(await(httpClient.Get(..))));
  }
  
  Task&lt;IEnumerable&lt;Item2&gt;&gt; GetItems2() 
  {
      return RunRequest(async () =&gt; ParseItemsFromResponse(await httpClient.Get(..)));
  }
  
  
  TResult RunRequest&lt;TResult&gt;(Func&lt;TResult&gt; req)
  {
      try
      {
          return req();
      }
      catch (Exception ex)
      {
          // Parse exception here and throw custom exceptions
      }
  }
  </code></pre>
  
  <p>The issue is the void anonymous method <code>async () =&gt; ParseItemsFromResponse(..)</code>. </p>
  
  <p>Since it returns void and not a <code>Task</code>, if there's an exception thrown within the anonymous method, it's actually not going to be caught by the <code>try</code> and <code>catch</code> within the <code>RunRequest</code>.</p>
  
  <p>Any suggestions how to refactor this?</p>