你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ServiceExceptionFilterAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供一个默认值 System.Web.Http.Filters.ExceptionFilterAttribute ,用于捕获筛选器管道中发生的未经处理的异常并记录这些异常。
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)]
public sealed class ServiceExceptionFilterAttribute : System.Web.Http.Filters.ExceptionFilterAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)>]
type ServiceExceptionFilterAttribute = class
inherit ExceptionFilterAttribute
Public NotInheritable Class ServiceExceptionFilterAttribute
Inherits ExceptionFilterAttribute
- 继承
-
System.Web.Http.Filters.ExceptionFilterAttributeServiceExceptionFilterAttribute
- 属性
构造函数
ServiceExceptionFilterAttribute() |
提供一个默认值 System.Web.Http.Filters.ExceptionFilterAttribute ,用于捕获筛选器管道中发生的未经处理的异常并记录这些异常。 |
方法
OnException(HttpActionExecutedContext) |
使用 LogCategories 记录未经处理的异常,使异常显示在应用程序日志中,除非应用程序已配置为不记录此类事件。 |