Catch an exception thrown by an async void method
It’s somewhat weird to read but yes, the exception will bubble up to the calling code – but only if you await or Wait() the call to Foo. public async Task Foo() { var x = await DoSomethingAsync(); } public async void DoFoo() { try { await Foo(); } catch (ProtocolException ex) { // The … Read more