public static WeChatException CreateException(WeChatErrorCode errorCode)
 {
     return(Exceptions.GetOrAdd(errorCode, key => new WeChatException(errorCode, "")));
 }
 public WeChatException(Exception e) : base(e.Message, e)
 {
     ErrorCode = GetErrorCode(e);
 }
 public WeChatException(WeChatErrorCode errorCode, Exception e) : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
 public static WeChatException CreateException(WeChatErrorCode errorCode)
 {
     return Exceptions.GetOrAdd(errorCode, key => new WeChatException(errorCode, ""));
 }
 public static WeChatException CreateException(WeChatErrorCode errorCode, string msg)
 {
     if (msg.IsNullOrEmpty()) return CreateException(errorCode);
     return new WeChatException(errorCode, msg);
 }
 public WeChatException(WeChatErrorCode errorCode, Exception e)
     : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
 public WeChatException(WeChatErrorCode errorCode, string msg)
     : base(msg)
 {
     ErrorCode = errorCode;
 }
Beispiel #8
0
 protected Task <ActionEvent> NotifyErrorEventAsync(WeChatErrorCode code, string msg)
 {
     return(NotifyErrorEventAsync(WeChatException.CreateException(code, msg)));
 }
Beispiel #9
0
 public WeChatException(WeChatErrorCode errorCode, string msg) : base(msg)
 {
     ErrorCode = errorCode;
 }
Beispiel #10
0
 protected Task<ActionEvent> NotifyErrorEventAsync(WeChatErrorCode code, string msg)
 {
     return NotifyErrorEventAsync(WeChatException.CreateException(code, msg));
 }