ExceptionFilterAttribute Class¶
An abstract filter that runs asynchronously after an action has thrown an System.Exception
. Subclasses
must override Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext)
or Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.OnExceptionAsync(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext)
but not both.
- Namespace
Microsoft.AspNetCore.Mvc.Filters
- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute
Syntax¶
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public abstract class ExceptionFilterAttribute : Attribute, _Attribute, IAsyncExceptionFilter, IExceptionFilter, IOrderedFilter, IFilterMetadata
-
class
Microsoft.AspNetCore.Mvc.Filters.
ExceptionFilterAttribute
Properties¶
-
Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.
Order
¶ Return type: System.Int32 public int Order { get; set; }
-