Bagikan melalui


ExceptionFilterAttribute Kelas

Definisi

Filter abstrak yang berjalan secara asinkron setelah tindakan melemparkan Exception. Subkelas harus mengambil OnException(ExceptionContext) alih atau OnExceptionAsync(ExceptionContext) tetapi tidak keduanya.

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
Warisan
ExceptionFilterAttribute
Atribut
Penerapan

Konstruktor

ExceptionFilterAttribute()

Filter abstrak yang berjalan secara asinkron setelah tindakan melemparkan Exception. Subkelas harus mengambil OnException(ExceptionContext) alih atau OnExceptionAsync(ExceptionContext) tetapi tidak keduanya.

Properti

Order

Mendapatkan nilai pesanan untuk menentukan urutan eksekusi filter. Filter dijalankan dalam nilai numerik naik dari Order properti .

Metode

OnException(ExceptionContext)

Dipanggil setelah tindakan telah melemparkan Exception.

OnExceptionAsync(ExceptionContext)

Dipanggil setelah tindakan telah melemparkan Exception.

Berlaku untuk