kongzy
2024-01-29 983bdb5b89932b38d08a11ad1eed6ea89d1597e1
assess-framework/src/main/java/com/gkhy/assess/framework/exception/GlobalExceptionHandler.java
@@ -18,6 +18,7 @@
import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;
import java.sql.SQLSyntaxErrorException;
/**
 * 全局异常处理类
@@ -30,7 +31,7 @@
    @ExceptionHandler(value = ApiException.class)
    public CommonResult handle(ApiException e){
        writeExceptionLogFile(e);
      //  writeExceptionLogFile(e);
        if(e.getErrorCode()!=null){
            return CommonResult.failed(e.getErrorCode());
        }
@@ -82,7 +83,7 @@
    public CommonResult handleRuntimeException(RuntimeException ex, HttpServletRequest request)
    {
        writeExceptionLogFile(ex);
        return CommonResult.failed(ex.getMessage());
        return CommonResult.failed("内部服务异常");
    }