Abp模块
abp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

807 B

Sanhe.Abp.ExceptionHandling

基于abp框架底层的IExceptionSubscriber实现二次扩展,用于自定义异常通知方式

配置使用

使用前只需配置AbpExceptionHandlingOptions定义需要发送通知的异常即可。


    [DependsOn(
        typeof(AbpExceptionHandlingModule)
        )]
    public class YouProjectModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            // 自定义需要处理的异常
            Configure<AbpExceptionHandlingOptions>(options =>
            {
                //  加入需要处理的异常类型
                options.Handlers.Add<AbpException>();
            });
        }
    }

作者colinin,Github