public class ExceptionCode extends Object implements IException
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ERROR_CODE
响应错误编码
|
static String |
EXCEPTION_CODE
响应业务异常编码
|
| 构造器和说明 |
|---|
ExceptionCode(String code,
String message)
初始化一个新创建的 Head 对象
|
ExceptionCode(String code,
String message,
Object... args) |
| 限定符和类型 | 方法和说明 |
|---|---|
static ExceptionCode |
error(String content,
Object... args)
返回失败响应
|
static ExceptionCode |
error(String code,
String content,
Object... args)
返回失败响应
|
ExceptionCode |
fill(Object... args) |
String |
getCode()
获取编码
|
String |
getMessage()
获取内容
|
String |
getSourseException() |
void |
setCode(String code)
设置编码
|
void |
setMessage(String message)
设置内容
|
void |
setSourseException(String sourseException) |
String |
toString() |
public ExceptionCode(String code, String message)
type - 编码content - 内容public String getCode()
getCode 在接口中 IExceptionpublic void setCode(String code)
code - 编码public String getMessage()
getMessage 在接口中 IExceptionpublic void setMessage(String message)
message - 内容public String getSourseException()
public void setSourseException(String sourseException)
public static ExceptionCode error(String content, Object... args)
content - 内容args - 参数public static ExceptionCode error(String code, String content, Object... args)
content - 编码content - 内容args - 参数public ExceptionCode fill(Object... args)
Copyright © 2020. All rights reserved.