异常打印4
This commit is contained in:
@@ -146,6 +146,7 @@ public class CzgControllerAdvice {
|
||||
public CzgResult<Object> errorHandler(Exception ex) {
|
||||
Throwable rootCause = ex;
|
||||
while (rootCause.getCause() != null) {
|
||||
log.info("rootCause:{}", rootCause.getClass());
|
||||
rootCause = rootCause.getCause();
|
||||
if (rootCause instanceof CzgException czgException) {
|
||||
return CzgResult.failure(czgException.getCode(), czgException.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user