!64 Web层ExceptionHandlerAdvice#exceptionResponse重复提取1个异常信息

Merge pull request !64 from liruohrh/N/A
pull/64/head
Java3y 1 year ago committed by Gitee
commit bf831a7913
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -26,8 +26,9 @@ public class ExceptionHandlerAdvice {
@ExceptionHandler({Exception.class}) @ExceptionHandler({Exception.class})
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
public BasicResultVO<String> exceptionResponse(Exception e) { public BasicResultVO<String> exceptionResponse(Exception e) {
log.error(Throwables.getStackTrace(e)); String errStackStr = Throwables.getStackTrace(e);
return BasicResultVO.fail(RespStatusEnum.ERROR_500, "\r\n" + Throwables.getStackTrace(e) + "\r\n"); log.error(errStackStr);
return BasicResultVO.fail(RespStatusEnum.ERROR_500, "\r\n" + errStackStr + "\r\n");
} }
@ExceptionHandler({CommonException.class}) @ExceptionHandler({CommonException.class})

Loading…
Cancel
Save