ChipDemo/Core/Features/FeatureExceptionContext.cs

22 lines
504 B
C#

using Demo.Models;
namespace Demo.Features;
/// <summary>
/// 功能运行时异常上下文
/// </summary>
public class FeatureExceptionContext
{
public Feature Feature { get; }
public FeatureException Exception { get; }
public FeatureExceptionContext(Feature feature, FeatureException exception)
{
Feature = feature;
Exception = exception;
}
/// <summary>
/// 表示异常是否已处理
/// </summary>
public bool Handled { get; set; } = false;
}