处理异常捕获类型
This commit is contained in:
parent
fbcf8e48fd
commit
5f18184362
@ -1,19 +1,16 @@
|
||||
package com.cm.central.control.client.socket.aspect;
|
||||
|
||||
import com.cm.central.control.client.socket.service.socket.BaseSocketService;
|
||||
import com.cm.central.control.client.socket.service.socket.exception.ExceptionServiceImpl;
|
||||
import com.cm.common.exception.base.SystemException;
|
||||
import com.cm.socket.service.ISocketService;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.security.authentication.InsufficientAuthenticationException;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.sql.SQLSyntaxErrorException;
|
||||
|
||||
/**
|
||||
* @ClassName: ApiLogAspect
|
||||
@ -44,8 +41,7 @@ public class ClientExceptionAspect {
|
||||
result = proceedingJoinPoint.proceed();
|
||||
} catch (Throwable e) {
|
||||
boolean exceptionFlag = e instanceof SystemException
|
||||
|| e instanceof SQLSyntaxErrorException
|
||||
|| e instanceof InsufficientAuthenticationException;
|
||||
|| e instanceof AuthenticationException;
|
||||
if (!exceptionFlag) {
|
||||
new Thread(() -> {
|
||||
exceptionServiceImpl.writeThrowable(e);
|
||||
|
Loading…
Reference in New Issue
Block a user