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