Exemple #1
0
 public static QQException CreateException(QQErrorCode errorCode, string msg)
 {
     if (msg.IsNullOrEmpty())
     {
         return(CreateException(errorCode));
     }
     return(new QQException(errorCode, msg));
 }
 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);
 }
Exemple #3
0
 public QQException(Exception e) : base(e.Message, e)
 {
     ErrorCode = GetErrorCode(e);
 }
Exemple #4
0
 public QQException(QQErrorCode errorCode, string msg) : base(msg)
 {
     ErrorCode = errorCode;
 }
 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;
 }
Exemple #6
0
 protected Task<ActionEvent> NotifyErrorEventAsync(QQErrorCode code, string msg)
 {
     return NotifyErrorEventAsync(QQException.CreateException(code, msg));
 }
Exemple #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;
 }
Exemple #8
0
 public QQException(Exception e) : base(e.Message)
 {
     ErrorCode   = GetErrorCode(e);
     _stackTrace = e.StackTrace;
 }
Exemple #9
0
 public QQException(QQErrorCode errorCode, Exception e)
     : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
Exemple #10
0
 public QQException(QQErrorCode errorCode, string msg)
     : base(msg)
 {
     ErrorCode = errorCode;
 }
Exemple #11
0
 public QQException(QQErrorCode errorCode)
     : base(errorCode.ToString())
 {
     ErrorCode = errorCode;
 }
Exemple #12
0
 public static QQException CreateException(QQErrorCode errorCode, string msg)
 {
     if (msg.IsNullOrEmpty()) return CreateException(errorCode);
     return new QQException(errorCode, msg);
 }
Exemple #13
0
 public static QQException CreateException(QQErrorCode errorCode)
 {
     return Exceptions.GetOrAdd(errorCode, key => new QQException(errorCode, ""));
 }
Exemple #14
0
 public QQException(QQErrorCode errorCode, Exception e) : base(e.Message)
 {
     ErrorCode   = errorCode;
     _stackTrace = e.StackTrace;
 }
Exemple #15
0
 public QQException(QQErrorCode errorCode, Exception e) : base(e.Message, e)
 {
     ErrorCode = errorCode;
 }
Exemple #16
0
 public QQException(QQErrorCode errorCode) : base(errorCode.ToString())
 {
     ErrorCode = errorCode;
 }
Exemple #17
0
 public static QQException CreateException(QQErrorCode errorCode)
 {
     return(Exceptions.GetOrAdd(errorCode, key => new QQException(errorCode, "")));
 }
Exemple #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;
 }
Exemple #19
0
 protected Task <ActionEvent> NotifyErrorEventAsync(QQErrorCode code, string msg)
 {
     return(NotifyErrorEventAsync(QQException.CreateException(code, msg)));
 }
Exemple #20
0
 public QQException(QQErrorCode errorCode) : this(errorCode, errorCode.GetDescription())
 {
     ErrorCode = errorCode;
 }