ExceptionFilterAttribute Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk