namespace QYZH.InteractiveMagazine.Models.Common; /// /// 业务异常类 /// public class BusinessException : Exception { /// /// 错误码 /// public int Code { get; set; } /// /// 无参构造函数 /// public BusinessException() : base() { } /// /// 构造函数 /// /// 异常消息 public BusinessException(string message) : base(message) { } /// /// 构造函数 /// /// 异常消息 /// 错误码 public BusinessException(string message, int code) : base(message) { Code = code; } /// /// 构造函数 /// /// 异常消息 /// 内部异常 public BusinessException(string message, Exception innerException) : base(message, innerException) { } }