You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Van Nguyen edited this page Dec 6, 2015
·
1 revision
Similar to MethodFilterAttribute, you can implement ExceptionFilterAttribute to provide custom error handling logic. If the property MethodExceptionContext.Handled is true, all remaining ExceptionFilter will be ignored.
publicabstractclassExceptionFilterAttribute:Attribute{publicvirtualvoidOnException(MethodExceptionContextexceptionContext);publicvirtualTaskOnExceptionAsync(MethodExceptionContextexceptionContext);}Similarto MethodFilterAttribute,theOnExceptionAsyncmethod will be called only the decorated method is async.