admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
utils/src/main/java/com/qcloud/cmq/CMQServerException.java
@@ -1,41 +1,41 @@
package com.qcloud.cmq;
public class CMQServerException extends RuntimeException {
   private int httpStatus = 200;
    private int errorCode = 0;
   private String errorMessage = "";
    private String requestId ="";
    public CMQServerException(int status){
      this.httpStatus = status;
   }
    public CMQServerException(int errorCode, String errorMessage, String requestId){
        this.errorCode = errorCode;
      this.errorMessage = errorMessage;
        this.requestId = requestId;
    }
    public int getErrorCode() {
        return errorCode;
    }
   public String getErrorMessage() {
        return errorMessage;
    }
    public String getRequestId() {
        return requestId;
    }
    @Override
    public String toString() {
   if(httpStatus != 200)
      return "http status:" + httpStatus;
   else
           return "code:" + errorCode
                + ", message:" + errorMessage
            + ", requestId:" + requestId;
    }
}
package com.qcloud.cmq;
public class CMQServerException extends RuntimeException {
   private int httpStatus = 200;
    private int errorCode = 0;
   private String errorMessage = "";
    private String requestId ="";
    public CMQServerException(int status){
      this.httpStatus = status;
   }
    public CMQServerException(int errorCode, String errorMessage, String requestId){
        this.errorCode = errorCode;
      this.errorMessage = errorMessage;
        this.requestId = requestId;
    }
    public int getErrorCode() {
        return errorCode;
    }
   public String getErrorMessage() {
        return errorMessage;
    }
    public String getRequestId() {
        return requestId;
    }
    @Override
    public String toString() {
   if(httpStatus != 200)
      return "http status:" + httpStatus;
   else
           return "code:" + errorCode
                + ", message:" + errorMessage
            + ", requestId:" + requestId;
    }
}