MrAdvice: Try Catch aspect on async void method doesn't work
Hi, we have another problem with try/catch aspect described here
https://github.com/ArxOne/MrAdvice/issues/118
It just doesn’t come to catch block in case when unhandeled exception occurs in “async void” method:
public async void AddWhatever23()
{
throw new Exception("");
}
with public async Task AddWhatever23() - all OK.
Any ideas of handling such case?
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 17 (10 by maintainers)
I replied 😉
@dougcunha you missed the point in my answer; it was a smiling emoji. So no problem!