Exemplo n.º 1
0
 public MatrixRequestError(string merror, MatrixErrorCode code, HttpStatusCode status, int retryAfter = -1)
 {
     MatrixError     = merror;
     MatrixErrorCode = code;
     Status          = status;
     RetryAfter      = retryAfter;
 }
Exemplo n.º 2
0
        private void SetError(MatrixErrorCode errorCode, double value)
        {
            Errored   = true;
            ErrorCode = errorCode;
            string desc = errorCode.ToString() + ": " + "Value = " + value.ToString();

            throw new Exception(desc);
        }
Exemplo n.º 3
0
 public MatrixServerError(string errorcode, string message) : base(message)
 {
     if (!Enum.TryParse <MatrixErrorCode> (errorcode, out ErrorCode))
     {
         ErrorCode = MatrixErrorCode.CL_UNKNOWN_ERROR_CODE;
     }
     ErrorCodeStr = errorcode;
 }
Exemplo n.º 4
0
 public MatrixServerError(string errorcode, string message, HttpStatusCode status, JObject errorObject) : base(message)
 {
     if (!Enum.TryParse(errorcode, out ErrorCode))
     {
         ErrorCode = MatrixErrorCode.CL_UNKNOWN_ERROR_CODE;
     }
     Status       = status;
     ErrorObject  = errorObject;
     ErrorCodeStr = errorcode;
 }
 public MatrixRequestError(string merror, MatrixErrorCode code, HttpStatusCode status)
 {
     MatrixError     = merror;
     MatrixErrorCode = code;
     Status          = status;
 }