public enum ErrorCode extends Enum<ErrorCode>
| 枚举常量和说明 |
|---|
INVALID_PARAMS
客户端错误,参数不合法
|
PARAM_OVER_MAX_LIMIT
客户端错误,参数超过最大限制
|
SERVER_ERR
服务端错误
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getCode() |
String |
getCodeName() |
EventException |
toException() |
EventException |
toException(String msg) |
static ErrorCode |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ErrorCode[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ErrorCode SERVER_ERR
public static final ErrorCode INVALID_PARAMS
public static final ErrorCode PARAM_OVER_MAX_LIMIT
public static ErrorCode[] values()
for (ErrorCode c : ErrorCode.values()) System.out.println(c);
public static ErrorCode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getCode()
public String getCodeName()
public EventException toException()
public EventException toException(String msg)
Copyright © 2018. All rights reserved.