自动化立体仓库 - WMS系统
chen.lin
2026-02-14 371462edc6b3ee1de97c235d4a019b544badda0d
src/main/java/com/zy/common/config/CoolExceptionHandler.java
@@ -2,6 +2,8 @@
import com.core.common.R;
import com.core.exception.CoolException;
import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.connector.ClientAbortException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@@ -10,11 +12,13 @@
/**
 * Created by vincent on 2019-06-09
 */
@Slf4j
@RestControllerAdvice
public class CoolExceptionHandler {
    @ExceptionHandler(Exception.class)
    public R handlerException(HandlerMethod handler, Exception e) {
        log.error("全局异常处理器捕获异常,handler: {}, 异常信息: {}", handler != null ? handler.getMethod().getName() : "unknown", e.getMessage(), e);
        e.printStackTrace();
        return R.error();
    }