internal static async Task DoStuffInBackground() { await Task.Run(() => throw new IOException("Server did not respond")); } }
public async void AsyncException(object sender, EventArgs e) { try { await FakeService.DoStuffInBackground(); } catch (Exception ex) when(HandleExceptionsSwitchCell.On) { TrackException(ex); } }