public class BusinessException extends BaseBusinessException
code, data
构造器和说明 |
---|
BusinessException(Integer code,
Object data,
String messageTemplate,
Object... params) |
BusinessException(Integer code,
String msg) |
BusinessException(Integer code,
String msg,
Object data) |
BusinessException(Integer code,
String msg,
Object data,
Throwable throwable) |
BusinessException(Integer code,
String msg,
Throwable throwable) |
BusinessException(ResponseStatus responseStatus) |
BusinessException(Throwable throwable,
Integer code,
Object data,
String messageTemplate,
Object... params) |
限定符和类型 | 方法和说明 |
---|---|
static BusinessException |
of(Integer code,
String msg) |
static BusinessException |
of(Integer code,
String msg,
Object data) |
static BusinessException |
of(Integer code,
String msg,
Object data,
Throwable throwable) |
static BusinessException |
of(Integer code,
String msg,
Throwable throwable) |
static BusinessException |
of(ResponseStatus responseStatus) |
static BusinessException |
of(ResponseStatus responseStatus,
Object data) |
static BusinessException |
of(ResponseStatus responseStatus,
Object data,
Throwable throwable) |
static BusinessException |
of(ResponseStatus responseStatus,
Throwable throwable) |
static BusinessException |
of(Throwable throwable,
ResponseStatus responseStatus,
Object... params)
支持msg中有{}占位符的异常信息
|
getCode, getData
public BusinessException(ResponseStatus responseStatus)
public BusinessException(Integer code, String msg, Object data, Throwable throwable)
public BusinessException(Integer code, Object data, String messageTemplate, Object... params)
public static BusinessException of(Integer code, String msg)
public static BusinessException of(Integer code, String msg, Object data)
public static BusinessException of(Integer code, String msg, Throwable throwable)
public static BusinessException of(Integer code, String msg, Object data, Throwable throwable)
public static BusinessException of(ResponseStatus responseStatus)
public static BusinessException of(ResponseStatus responseStatus, Object data)
public static BusinessException of(ResponseStatus responseStatus, Throwable throwable)
public static BusinessException of(ResponseStatus responseStatus, Object data, Throwable throwable)
public static BusinessException of(Throwable throwable, ResponseStatus responseStatus, Object... params)
throwable
- 异常responseStatus
- 异常码params
- 占位符参数