ExceptionFilterAttribute Classe

Définition

Filtre abstrait qui s’exécute de manière asynchrone après qu’une action a lève un Exception. Les sous-classes doivent remplacer OnException(ExceptionContext) ou pas OnExceptionAsync(ExceptionContext) les deux.

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
Héritage
ExceptionFilterAttribute
Attributs
Implémente

Constructeurs

ExceptionFilterAttribute()

Filtre abstrait qui s’exécute de manière asynchrone après qu’une action a lève un Exception. Les sous-classes doivent remplacer OnException(ExceptionContext) ou pas OnExceptionAsync(ExceptionContext) les deux.

Propriétés

Order

Obtient la valeur d’ordre pour déterminer l’ordre d’exécution des filtres. Les filtres s’exécutent dans la valeur numérique croissante de la Order propriété.

Méthodes

OnException(ExceptionContext)

Appelée après qu’une action a lève un Exception.

OnExceptionAsync(ExceptionContext)

Appelée après qu’une action a lève un Exception.

S’applique à