using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace CloudBuilder.Core.Service { public class ValidatedException : Exception { public string SourceCode { get; set; } = "CloudBuilder.Core.ValidatedException"; public new string Message { get; set; } = string.Empty; /// /// 初始化类的新实例 /// public ValidatedException() { } /// /// 使用指定错误消息初始化类的新实例。 /// /// 描述错误的消息 public ValidatedException(string message) : base(message) { Message = message; } /// /// 使用异常消息与一个内部异常实例化一个类的新实例 /// /// 异常消息 /// 用于封装在内部的异常实例 public ValidatedException(string message, Exception inner) : base(message, inner) { Message = message; } /// /// 使用可序列化数据实例化一个类的新实例 /// /// 保存序列化对象数据的对象。 /// 有关源或目标的上下文信息。 protected ValidatedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }