public enum CommonExceptionEnum extends Enum<CommonExceptionEnum> implements BaseExceptionEnum
| 限定符和类型 | 字段和说明 |
|---|---|
private Integer |
errCode
自定义异常状态码
|
private Integer |
httpCode
http异常状态码
|
private String |
message
异常提示信息
|
| 限定符和类型 | 方法和说明 |
|---|---|
Integer |
getErrCode()
错误码
|
Integer |
getHttpCode()
http返回码
|
String |
getMessage()
异常信息
|
static CommonExceptionEnum |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static CommonExceptionEnum[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final CommonExceptionEnum RESOURCE_NOT_FOUND
public static final CommonExceptionEnum METHOD_NOT_ALLOWED
public static final CommonExceptionEnum DATA_TRANSFER_ERROR
public static final CommonExceptionEnum JSON_PARSING_ERROR
public static final CommonExceptionEnum JWT_GENERATE_TOKEN_ERROR
public static final CommonExceptionEnum JWT_GENERATE_TOKEN_SIGN_KEY_ERROR
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR_EXPIRED
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR_UNSUPPORTED
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR_MALFORMED
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR_SIGN
public static final CommonExceptionEnum JWT_PARSER_TOKEN_ERROR_ILLEGAL_ARGUMENT
public static final CommonExceptionEnum RSA_NO_SUCH_ALGORITHM
public static final CommonExceptionEnum RSA_INVALID_KEY_SPEC
public static final CommonExceptionEnum RSA_FILE_READ_ERROR
private Integer httpCode
private Integer errCode
private String message
public static CommonExceptionEnum[] values()
for (CommonExceptionEnum c : CommonExceptionEnum.values()) System.out.println(c);
public static CommonExceptionEnum valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public Integer getHttpCode()
BaseExceptionEnumgetHttpCode 在接口中 BaseExceptionEnumpublic Integer getErrCode()
BaseExceptionEnumgetErrCode 在接口中 BaseExceptionEnumpublic String getMessage()
BaseExceptionEnumgetMessage 在接口中 BaseExceptionEnumCopyright © 2023. All rights reserved.