1
zhang
15 小时以前 675c3b5d83b928c2bfbb84cd99a7d3f222d4432c
zy-acs-cv/src/main/java/com/zy/common/config/CoolExceptionHandler.java
@@ -1,7 +1,7 @@
package com.zy.common.config;
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.acs.common.domain.BaseResult;
import com.zy.acs.framework.exception.CoolException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@@ -14,19 +14,19 @@
public class CoolExceptionHandler {
    @ExceptionHandler(Exception.class)
    public R handlerException(HandlerMethod handler, Exception e) {
    public BaseResult handlerException(HandlerMethod handler, Exception e) {
        e.printStackTrace();
        return R.error();
        return BaseResult.error();
    }
    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
    public R handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
        return R.error();
    public BaseResult handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
        return BaseResult.error();
    }
    @ExceptionHandler(CoolException.class)
    public R handleRRException(CoolException e) {
        return R.parse(e.getMessage());
    public BaseResult handleRRException(Exception e) {
        return BaseResult.error(e.getMessage());
    }
}