修复自定义异常NPE问题
This commit is contained in:
parent
c669c268f7
commit
8cc165c9be
@ -128,7 +128,7 @@ public class Response<Data> implements Serializable {
|
||||
|
||||
public Response<Data> failure(RuntimeContext runtimeContext, HttpStatus httpStatus, CustomException customException) {
|
||||
setHandleSuccess(false);
|
||||
setErrorDetail(customException.getCause().toString()); // 异常堆栈
|
||||
setErrorDetail(customException.getData()); // 异常堆栈
|
||||
// 错误码使用 category+_+code
|
||||
return any(runtimeContext, httpStatus, customException.getCategory() + "_"+customException.getCode(), customException.getMessage(), null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user