Exemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="exceptionCode">异常编号</param>
 /// <param name="context">上下文</param>
 /// <param name="level">异常级别</param>
 public HXException(string exceptionCode, IDictionary <string, string> context, HXExceptionLevel level = HXExceptionLevel.Error)
     : base(exceptionCode)
 {
     this.Code  = exceptionCode;
     this.Level = level;
     InitData(context);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="exceptionCode">异常编号</param>
 /// <param name="message">异常信息</param>
 /// <param name="innerException">内部异常</param>
 /// <param name="context">上下文</param>
 /// <param name="level">异常级别</param>
 public HXException(string exceptionCode, string message, System.Exception innerException, IDictionary <string, string> context, HXExceptionLevel level = HXExceptionLevel.Error)
     : base(message, innerException)
 {
     this.Code  = exceptionCode;
     this.Level = level;
     InitData(context);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="exceptionCode">异常编号</param>
 /// <param name="message">异常信息</param>
 /// <param name="innerException">内部异常</param>
 /// <param name="level">异常级别</param>
 public HXException(string exceptionCode, string message, System.Exception innerException, HXExceptionLevel level = HXExceptionLevel.Error)
     : base(message, innerException)
 {
     this.Code  = exceptionCode;
     this.Level = level;
 }
Exemplo n.º 4
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="exceptionCode">异常编号</param>
 /// <param name="innerException">内部异常</param>
 /// <param name="level">异常级别</param>
 public HXException(string exceptionCode, System.Exception innerException, HXExceptionLevel level = HXExceptionLevel.Error)
     : base(GetDefaultMessage(innerException), innerException)
 {
     this.Code  = exceptionCode;
     this.Level = level;
 }
Exemplo n.º 5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="exceptionCode">异常编号</param>
 /// <param name="message">异常信息</param>
 /// <param name="level">异常级别</param>
 public HXException(string exceptionCode, string message, HXExceptionLevel level = HXExceptionLevel.Error)
     : base(message)
 {
     this.Code  = exceptionCode;
     this.Level = level;
 }
Exemplo n.º 6
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="info">序列化信息</param>
 /// <param name="context">上下文</param>
 protected HXException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.Code  = info.GetString("ExceptionCode");
     this.Level = (HXExceptionLevel)info.GetSingle("Level");
 }