zhang
6 天以前 3ae3ce1721b1a98b17c2c602c99b7226cbd32894
zy-acs-manager/src/main/java/com/zy/acs/manager/common/exception/GlobalExceptionHandler.java
@@ -1,9 +1,9 @@
package com.zy.acs.manager.common.exception;
import com.zy.acs.framework.common.R;
import com.zy.acs.framework.exception.CoolException;
import com.zy.acs.manager.common.constant.Constants;
import com.zy.acs.manager.common.utils.CommonUtil;
import com.zy.acs.framework.common.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
@@ -51,8 +51,11 @@
    @ExceptionHandler(CoolException.class)
    public R coolExceptionHandler(CoolException e, HttpServletResponse response) {
        CommonUtil.addCrossHeaders(response);
        if (e.getCode() == null) {
        return R.error(e.getMessage());
    }
        return R.error(e.getCode(), e.getMessage());
    }
    @ResponseBody
    @ExceptionHandler(Throwable.class)