ExceptionFilterAttribute Class

Definition

An abstract filter that runs asynchronously after an action has thrown an Exception. Subclasses must override OnException(ExceptionContext) or OnExceptionAsync(ExceptionContext) but not both.

public ref class ExceptionFilterAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Filters::IAsyncExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class ExceptionFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ExceptionFilterAttribute = class
    inherit Attribute
    interface IAsyncExceptionFilter
    interface IFilterMetadata
    interface IExceptionFilter
    interface IOrderedFilter
Public MustInherit Class ExceptionFilterAttribute
Inherits Attribute
Implements IAsyncExceptionFilter, IExceptionFilter, IOrderedFilter
Inheritance
ExceptionFilterAttribute
Attributes
Implements

Constructors

ExceptionFilterAttribute()

Properties

Order

Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Order property.

Methods

OnException(ExceptionContext)

Called after an action has thrown an Exception.

OnExceptionAsync(ExceptionContext)

Called after an action has thrown an Exception.

Applies to