public class AppactiveException extends RuntimeException
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
code
Key
|
protected Object |
context
针对当前异常附件的业务上下文数据
|
protected String |
msg
Error Message
|
| 构造器和说明 |
|---|
AppactiveException(String message) |
AppactiveException(String code,
String msg) |
AppactiveException(String code,
String msg,
Throwable tr) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getCode() |
Object |
getContext() |
<T> T |
getContext(Class<T> contextType) |
String |
getMessage() |
String |
getMsg() |
String |
getShortMessage() |
boolean |
isMatchCode(String code) |
boolean |
isMatchMsg(IMsg msgInfo) |
void |
setCode(String code) |
void |
setContext(Object context) |
void |
setMsg(String msg) |
protected String code
protected String msg
protected Object context
public AppactiveException(String message)
public String getMessage()
getMessage 在类中 ThrowableThrowable.getMessage()public String getShortMessage()
public boolean isMatchCode(String code)
public boolean isMatchMsg(IMsg msgInfo)
public String getCode()
public void setCode(String code)
code - The code to set.public String getMsg()
public void setMsg(String msg)
msg - The msg to set.public <T> T getContext(Class<T> contextType)
public Object getContext()
public void setContext(Object context)
Copyright © 2013–2022 Alibaba Group. All rights reserved.