public enum ResponseEnum extends Enum<ResponseEnum> implements IResponse, Assert
| Enum Constant and Description |
|---|
ASSERT_ERROR
断言错误
|
BIZ_ERROR |
CURRENT_USER_FAIL
获取当前用户失败
|
DEMO_MODE_EXCEPTION |
ERROR
服务异常
|
ERROR_D_IDEMPOTENT |
ERROR_D_LOCK
分布式锁异常
|
ERROR_E |
ERROR_NULL
空指针错误
|
ERROR_RUNTIME
发生运行时异常 RuntimeException
|
ERROR_SQL
发生SQL异常 SQLException
|
FAIL_AUTH |
FAIL_AUTH_FORBIDDEN |
FAIL_AUTH_TOKEN
token 认证失败
|
FAIL_NO_TOKEN
token 认证失败
|
FAIL_UNAUTHORIZED
未授权
|
FAILURE
业务异常
|
MAX_UPLOAD_SIZE_EXCEPTION |
METHOD_ARGUMENT_NOTVALID_EXCEPTION |
NOT_FOUND
服务未找到
|
REQUEST_TOO_MANY_REQUESTS |
SERVICE_404 |
SERVICE_API_ERROR |
SERVICE_FALLBACK |
SUCCESS
操作成功
|
THIRD_PARTY_API_ERROR |
TOO_MANY_REQUESTS
Too Many Requests
|
VALIDATED_BIND_EXCEPTION |
VERIFY_ERROR
验证失败
|
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
code
状态码
|
(package private) String |
msg
消息内容
|
| Modifier and Type | Method and Description |
|---|---|
AssertException |
newException(String errMsg) |
AssertException |
newException(Throwable t) |
AssertException |
newException(Throwable t,
String errMsg)
创建异常
|
static ResponseEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseEnum SUCCESS
public static final ResponseEnum FAILURE
public static final ResponseEnum FAIL_AUTH_FORBIDDEN
public static final ResponseEnum FAIL_AUTH
public static final ResponseEnum FAIL_AUTH_TOKEN
public static final ResponseEnum FAIL_NO_TOKEN
public static final ResponseEnum FAIL_UNAUTHORIZED
public static final ResponseEnum NOT_FOUND
public static final ResponseEnum TOO_MANY_REQUESTS
public static final ResponseEnum VERIFY_ERROR
public static final ResponseEnum ASSERT_ERROR
public static final ResponseEnum ERROR
public static final ResponseEnum THIRD_PARTY_API_ERROR
public static final ResponseEnum DEMO_MODE_EXCEPTION
public static final ResponseEnum METHOD_ARGUMENT_NOTVALID_EXCEPTION
public static final ResponseEnum VALIDATED_BIND_EXCEPTION
public static final ResponseEnum MAX_UPLOAD_SIZE_EXCEPTION
public static final ResponseEnum ERROR_E
public static final ResponseEnum SERVICE_API_ERROR
public static final ResponseEnum SERVICE_404
public static final ResponseEnum SERVICE_FALLBACK
public static final ResponseEnum BIZ_ERROR
public static final ResponseEnum ERROR_SQL
public static final ResponseEnum ERROR_RUNTIME
public static final ResponseEnum ERROR_NULL
public static final ResponseEnum ERROR_D_LOCK
public static final ResponseEnum ERROR_D_IDEMPOTENT
public static final ResponseEnum REQUEST_TOO_MANY_REQUESTS
public static final ResponseEnum CURRENT_USER_FAIL
final int code
final String msg
public static ResponseEnum[] values()
for (ResponseEnum c : ResponseEnum.values()) System.out.println(c);
public static ResponseEnum valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic AssertException newException(Throwable t, String errMsg)
newException in interface Assertt - 异常errMsg - msgpublic AssertException newException(Throwable t)
newException in interface Assertpublic AssertException newException(String errMsg)
newException in interface AssertCopyright © 2023. All rights reserved.