Enum Class CommonErrorCode
- All Implemented Interfaces:
IErrorCode
,Serializable
,Comparable<CommonErrorCode>
,Constable
错误码分配中心
- Author:
- xezzon
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHTTP请求参数不符合校验规则数据权限无效无效的token数据不存在或已删除资源不存在未登录唯一键冲突 消息参数0: 重复的键名 -
Field Summary
Fields inherited from interface io.github.xezzon.zeroweb.core.error.IErrorCode
I18N_BASENAME
-
Method Summary
Modifier and TypeMethodDescriptionstatic IErrorCode
byte
模块编码 0 为公共模块 ZeroWeb 的模块编码从 -1~-128 分配 1~127 由使用者分配static CommonErrorCode
Returns the enum constant of this class with the specified name.static CommonErrorCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface io.github.xezzon.zeroweb.core.error.IErrorCode
code, name, serialNumber
-
Enum Constant Details
-
UNKNOWN
-
REPEAT_DATA
唯一键冲突 消息参数0: 重复的键名 -
ARGUMENT_NOT_VALID
HTTP请求参数不符合校验规则 -
NO_SUCH_DATA
数据不存在或已删除 -
NOT_FOUND
资源不存在 -
NOT_LOGIN
未登录 -
INVALID_TOKEN
无效的token -
DATA_PERMISSION_FORBIDDEN
数据权限无效
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
mapping
-
sourceType
- Specified by:
sourceType
in interfaceIErrorCode
- Returns:
- 错误来源类型
-
moduleCode
public byte moduleCode()Description copied from interface:IErrorCode
模块编码 0 为公共模块 ZeroWeb 的模块编码从 -1~-128 分配 1~127 由使用者分配- Specified by:
moduleCode
in interfaceIErrorCode
- Returns:
- 模块编码
-