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