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.
 
 
 
 
 

24 lines
550 B

using System;
using System.Linq;
using Volo.Abp.Collections;
namespace Sanhe.Abp.ExceptionHandling;
public class AbpExceptionHandlingOptions
{
public ITypeList<Exception> Handlers { get; }
public AbpExceptionHandlingOptions()
{
Handlers = new TypeList<Exception>();
}
public bool HasNotifierError(Exception ex)
{
if (typeof(IHasNotifierErrorMessage).IsAssignableFrom(ex.GetType()))
{
return true;
}
return Handlers.Any(x => x.IsAssignableFrom(ex.GetType()));
}
}