Skip to content

[Proposal]: async method exception filter #9001

@333fred

Description

@333fred

async method exception filter

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).

Design meetings

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions