Example #1
0
 public static QQException CreateException(QQErrorCode errorCode, string msg)
 {
     if (msg.IsNullOrEmpty())
     {
         return(CreateException(errorCode));
     }
     return(new QQException(errorCode, msg));
 }
Example #2
0
 private bool DoRetryIt(QQErrorCode code, Exception t)
 {
     if (ActionFuture.IsCanceled)
     {
         return(true);
     }
     ++_retryTimes;
     if (_retryTimes < QQConstants.MAX_RETRY_TIMES)
     {
         NotifyActionEvent(QQActionEventType.EVT_RETRY, new QQException(code, t));
         Thread.Sleep(1000);
         Context.PushActor(new HttpActor(HttpActorType.BUILD_REQUEST, Context, this));
         return(true);
     }
     return(false);
 }
Example #3
0
 public QQException(Exception e) : base(e.Message, e)
 {
     ErrorCode = GetErrorCode(e);
 }
Example #4
0
 public QQException(QQErrorCode errorCode, string msg) : base(msg)
 {
     ErrorCode = errorCode;
 }
Example #5
0
 private bool DoRetryIt(QQErrorCode code, Exception t)
 {
     if (ActionFuture.IsCanceled) return true;
     ++_retryTimes;
     if (_retryTimes < QQConstants.MAX_RETRY_TIMES)
     {
         NotifyActionEvent(QQActionEventType.EVT_RETRY, new QQException(code, t));
         Thread.Sleep(1000);
         Context.PushActor(new HttpActor(HttpActorType.BUILD_REQUEST, Context, this));
         return true;
     }
     return false;
 }
Example #6
0
 protected Task<ActionEvent> NotifyErrorEventAsync(QQErrorCode code, string msg)
 {
     return NotifyErrorEventAsync(QQException.CreateException(code, msg));
 }
Example #7
0
 /**
  * <p>Constructor for QQException.</p>
  *
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param e a {@link java.lang.Throwable} object.
  */
 public QQException(QQErrorCode errorCode, Exception e) : base(errorCode.ToString(), e)
 {
     this.errorCode = errorCode;
 }
Example #8
0
 public QQException(Exception e) : base(e.Message)
 {
     ErrorCode   = GetErrorCode(e);
     _stackTrace = e.StackTrace;
 }
Example #9
0
 public QQException(QQErrorCode errorCode, Exception e)
     : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
Example #10
0
 public QQException(QQErrorCode errorCode, string msg)
     : base(msg)
 {
     ErrorCode = errorCode;
 }
Example #11
0
 public QQException(QQErrorCode errorCode)
     : base(errorCode.ToString())
 {
     ErrorCode = errorCode;
 }
Example #12
0
 public static QQException CreateException(QQErrorCode errorCode, string msg)
 {
     if (msg.IsNullOrEmpty()) return CreateException(errorCode);
     return new QQException(errorCode, msg);
 }
Example #13
0
 public static QQException CreateException(QQErrorCode errorCode)
 {
     return Exceptions.GetOrAdd(errorCode, key => new QQException(errorCode, ""));
 }
Example #14
0
 public QQException(QQErrorCode errorCode, Exception e) : base(e.Message)
 {
     ErrorCode   = errorCode;
     _stackTrace = e.StackTrace;
 }
Example #15
0
 public QQException(QQErrorCode errorCode, Exception e) : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
Example #16
0
 public QQException(QQErrorCode errorCode) : base(errorCode.ToString())
 {
     ErrorCode = errorCode;
 }
Example #17
0
 public static QQException CreateException(QQErrorCode errorCode)
 {
     return(Exceptions.GetOrAdd(errorCode, key => new QQException(errorCode, "")));
 }
Example #18
0
 /**
  * <p>Constructor for QQException.</p>
  *
  * @param errorCode a {@link iqq.im.QQException.QQErrorCode} object.
  * @param msg a {@link java.lang.String} object.
  */
 public QQException(QQErrorCode errorCode, String msg) : base(msg)
 {
     this.errorCode = errorCode;
 }
Example #19
0
 protected Task <ActionEvent> NotifyErrorEventAsync(QQErrorCode code, string msg)
 {
     return(NotifyErrorEventAsync(QQException.CreateException(code, msg)));
 }
Example #20
0
 public QQException(QQErrorCode errorCode) : this(errorCode, errorCode.GetDescription())
 {
     ErrorCode = errorCode;
 }