类 NacosException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.alibaba.nacos.api.exception.NacosException
-
- 所有已实现的接口:
java.io.Serializable
- 直接已知子类:
NacosApiException
public class NacosException extends java.lang.ExceptionNacos Exception.- 作者:
- Nacos
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static intBAD_GATEWAYbad gateway(路由异常,如nginx后面的Server挂掉).private java.lang.ThrowablecauseThrowablestatic intCLIENT_DISCONNECTclient disconnect.static intCLIENT_ERRORclient error(client异常,返回给服务端).static intCLIENT_INVALID_PARAMinvalid param(参数错误).static intCLIENT_OVER_THRESHOLDover client threshold(超过client端的限流阈值).static intCONFLICTconflict(写并发冲突).private interrCodeprivate java.lang.StringerrMsgstatic intHTTP_CLIENT_ERROR_CODEhttp client error code, ome exceptions that occurred when the use the Nacos RestTemplate and Nacos AsyncRestTemplate.static intINVALID_PARAMinvalid param(参数错误).static intINVALID_SERVER_STATUSServer is not started.static intNO_HANDLERNo Handler Found.static intNO_RIGHTno right(鉴权失败).static intNOT_FOUNDnot found.static intOVER_THRESHOLDover threshold(超过server端的限流阈值).static intRESOURCE_NOT_FOUNDprivate static longserialVersionUIDserialVersionUID.static intSERVER_ERRORserver error(server异常,如超时).static intUN_REGISTERConnection is not registered.
-
构造器概要
构造器 构造器 说明 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.ThrowablegetCauseThrowable(java.lang.Throwable t)intgetErrCode()java.lang.StringgetErrMsg()voidsetCauseThrowable(java.lang.Throwable throwable)voidsetErrCode(int errCode)voidsetErrMsg(java.lang.String errMsg)java.lang.StringtoString()
-
-
-
字段详细资料
-
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
-
-