类 NacosException

  • 所有已实现的接口:
    java.io.Serializable
    直接已知子类:
    NacosApiException

    public class NacosException
    extends java.lang.Exception
    Nacos Exception.
    作者:
    Nacos
    另请参阅:
    序列化表格
    • 构造器概要

      构造器 
      构造器 说明
      NacosException()  
      NacosException​(int errCode, java.lang.String errMsg)  
      NacosException​(int errCode, java.lang.String errMsg, java.lang.Throwable throwable)  
      NacosException​(int errCode, java.lang.Throwable throwable)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      private java.lang.Throwable getCauseThrowable​(java.lang.Throwable t)  
      int getErrCode()  
      java.lang.String getErrMsg()  
      void setCauseThrowable​(java.lang.Throwable throwable)  
      void setErrCode​(int errCode)  
      void setErrMsg​(java.lang.String errMsg)  
      java.lang.String toString()  
      • 从类继承的方法 java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 字段详细资料

      • serialVersionUID

        private static final long serialVersionUID
        serialVersionUID.
        另请参阅:
        常量字段值
      • errCode

        private int errCode
      • errMsg

        private java.lang.String errMsg
      • causeThrowable

        private java.lang.Throwable causeThrowable
      • CLIENT_INVALID_PARAM

        public static final int CLIENT_INVALID_PARAM
        invalid param(参数错误).
        另请参阅:
        常量字段值
      • CLIENT_DISCONNECT

        public static final int CLIENT_DISCONNECT
        client disconnect.
        另请参阅:
        常量字段值
      • CLIENT_OVER_THRESHOLD

        public static final int CLIENT_OVER_THRESHOLD
        over client threshold(超过client端的限流阈值).
        另请参阅:
        常量字段值
      • INVALID_PARAM

        public static final int INVALID_PARAM
        invalid param(参数错误).
        另请参阅:
        常量字段值
      • NO_RIGHT

        public static final int NO_RIGHT
        no right(鉴权失败).
        另请参阅:
        常量字段值
      • NOT_FOUND

        public static final int NOT_FOUND
        not found.
        另请参阅:
        常量字段值
      • CONFLICT

        public static final int CONFLICT
        conflict(写并发冲突).
        另请参阅:
        常量字段值
      • SERVER_ERROR

        public static final int SERVER_ERROR
        server error(server异常,如超时).
        另请参阅:
        常量字段值
      • CLIENT_ERROR

        public static final int CLIENT_ERROR
        client error(client异常,返回给服务端).
        另请参阅:
        常量字段值
      • BAD_GATEWAY

        public static final int BAD_GATEWAY
        bad gateway(路由异常,如nginx后面的Server挂掉).
        另请参阅:
        常量字段值
      • OVER_THRESHOLD

        public static final int OVER_THRESHOLD
        over threshold(超过server端的限流阈值).
        另请参阅:
        常量字段值
      • INVALID_SERVER_STATUS

        public static final int INVALID_SERVER_STATUS
        Server is not started.
        另请参阅:
        常量字段值
      • UN_REGISTER

        public static final int UN_REGISTER
        Connection is not registered.
        另请参阅:
        常量字段值
      • NO_HANDLER

        public static final int NO_HANDLER
        No Handler Found.
        另请参阅:
        常量字段值
      • RESOURCE_NOT_FOUND

        public static final int RESOURCE_NOT_FOUND
        另请参阅:
        常量字段值
      • HTTP_CLIENT_ERROR_CODE

        public static final int HTTP_CLIENT_ERROR_CODE
        http client error code, ome exceptions that occurred when the use the Nacos RestTemplate and Nacos AsyncRestTemplate.
        另请参阅:
        常量字段值
    • 构造器详细资料

      • NacosException

        public NacosException()
      • NacosException

        public NacosException​(int errCode,
                              java.lang.String errMsg)
      • NacosException

        public NacosException​(int errCode,
                              java.lang.Throwable throwable)
      • NacosException

        public NacosException​(int errCode,
                              java.lang.String errMsg,
                              java.lang.Throwable throwable)
    • 方法详细资料

      • getErrCode

        public int getErrCode()
      • getErrMsg

        public java.lang.String getErrMsg()
      • setErrCode

        public void setErrCode​(int errCode)
      • setErrMsg

        public void setErrMsg​(java.lang.String errMsg)
      • setCauseThrowable

        public void setCauseThrowable​(java.lang.Throwable throwable)
      • getCauseThrowable

        private java.lang.Throwable getCauseThrowable​(java.lang.Throwable t)
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Throwable