-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
async method exception filter
- Specification: None yet
- Discussion: [Proposal]: async method exception filter #9000
Summary
Allow customizing the exception handling produced for async methods.
Adding the following attribute:
[module: AsyncExceptionFilter(typeof(MyExceptionHandler)]
would result in the generated try/catch having a modified catch clause:
catch (Exception e) when (MyExceptionHandler.Report(e); true)
{
... existing handling logic ...
}where we could find the following method void Report(Exception).