public enum SentinelErrorInfoEnum extends Enum<SentinelErrorInfoEnum>
| 枚举常量和说明 |
|---|
AuthorityException
授权规则不通过
|
DegradeException
服务降级
|
FlowException
流控异常
|
ParamFlowException
热点参数异常
|
SystemBlockException
系统规则限流或降级
|
UnknownError
授权规则不通过
|
| 限定符和类型 | 方法和说明 |
|---|---|
Integer |
getCode() |
String |
getError() |
static SentinelErrorInfoEnum |
getErrorByException(Throwable throwable)
根据异常名称匹配
|
void |
setCode(Integer code) |
void |
setError(String error) |
static SentinelErrorInfoEnum |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static SentinelErrorInfoEnum[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final SentinelErrorInfoEnum FlowException
public static final SentinelErrorInfoEnum ParamFlowException
public static final SentinelErrorInfoEnum SystemBlockException
public static final SentinelErrorInfoEnum AuthorityException
public static final SentinelErrorInfoEnum UnknownError
public static final SentinelErrorInfoEnum DegradeException
public static SentinelErrorInfoEnum[] values()
for (SentinelErrorInfoEnum c : SentinelErrorInfoEnum.values()) System.out.println(c);
public static SentinelErrorInfoEnum valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String getError()
public void setError(String error)
public Integer getCode()
public void setCode(Integer code)
public static SentinelErrorInfoEnum getErrorByException(Throwable throwable)
throwable - 异常Copyright © 2023. All rights reserved.