异常打印4
This commit is contained in:
parent
0428a4a202
commit
5141c019cd
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue