Share via


ExceptionFilterAttribute Classe

Definição

Um filtro abstrato que é executado de forma assíncrona após uma ação ter gerado um Exception. As subclasses devem substituir OnException(ExceptionContext) ou OnExceptionAsync(ExceptionContext) não ambas.

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
Herança
ExceptionFilterAttribute
Atributos
Implementações

Construtores

ExceptionFilterAttribute()

Um filtro abstrato que é executado de forma assíncrona após uma ação ter gerado um Exception. As subclasses devem substituir OnException(ExceptionContext) ou OnExceptionAsync(ExceptionContext) não ambas.

Propriedades

Order

Obtém o valor da ordem para determinar a ordem de execução de filtros. Os filtros são executados no valor numérico crescente da Order propriedade .

Métodos

OnException(ExceptionContext)

Chamado após uma ação ter lançado um Exception.

OnExceptionAsync(ExceptionContext)

Chamado após uma ação ter lançado um Exception.

Aplica-se a