title: C++/winRT coroutine try/catch not working
body: <p>I have a C++/winRT coroutine that reads a file. The following 'gets' the file:</p>
  
  <pre><code>StorageFile _fileDoubles = co_await _turboCalc.GetFileAsync(L"FileDoubles.dbo");
  </code></pre>
  
  <p>Which executes properly because the file exists. If I change its name to a nonexistent file, my app fails with this error message:</p>
  
  <blockquote>
    <p>Exception thrown at 0x76903AC2 in IBuffer.exe: Microsoft C++ exception : winrt::hresult_error at memory location 0x02FBE338.</p>
  </blockquote>
  
  <p>If I enclose it in the following <code>try</code>/<code>catch</code>, My app still fails and with the same error message.</p>
  
  <pre><code>try {
      StorageFile _fileDoubles = co_await_turboCalc.GetFileAsync(L"FileDoublesZZZ.dbo"); //doesn't exist
  }
  catch (hresult_error const &amp; e) {
      printf("error: %ls\n", e.message().c_str());
  </code></pre>
  
  <p>}</p>
  
  <p>What is the proper way to use <code>try</code>/<code>catch</code> in a couroutine?</p>