这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
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.
 
 
 
 
 
 

1.5 KiB

LINGYUN.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>();
            });
        }
    }

配置项说明

  • Handlers: 异常处理程序列表,用于定义需要处理的异常类型
  • HasNotifierError: 检查异常是否需要发送通知

扩展模块

更多

有关更多信息和配置示例,请参阅文档