🔥 移除 AliPay中的 yuanToFen方法
This commit is contained in:
@@ -5,6 +5,7 @@ import com.hccake.ballcat.common.core.exception.BusinessException;
|
||||
import com.hccake.ballcat.common.core.exception.handler.GlobalExceptionHandler;
|
||||
import com.hccake.ballcat.common.core.result.R;
|
||||
import com.hccake.ballcat.common.core.result.SystemResultCode;
|
||||
import javax.validation.ValidationException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -21,8 +22,6 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
||||
|
||||
import javax.validation.ValidationException;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
*
|
||||
@@ -40,6 +39,8 @@ public class GlobalExceptionHandlerResolver {
|
||||
|
||||
public final static String PROD_ERR_MSG = "系统异常,请联系管理员";
|
||||
|
||||
public final static String NLP_MSG = "空指针异常!";
|
||||
|
||||
/**
|
||||
* 全局异常捕获
|
||||
* @param e the e
|
||||
@@ -51,7 +52,8 @@ public class GlobalExceptionHandlerResolver {
|
||||
log.error("全局异常信息 ex={}", e.getMessage(), e);
|
||||
globalExceptionHandler.handle(e);
|
||||
// 当为生产环境, 不适合把具体的异常信息展示给用户, 比如数据库异常信息.
|
||||
String errorMsg = GlobalConstants.ENV_PROD.equals(profile) ? PROD_ERR_MSG : e.getLocalizedMessage();
|
||||
String errorMsg = GlobalConstants.ENV_PROD.equals(profile) ? PROD_ERR_MSG
|
||||
: (e instanceof NullPointerException ? NLP_MSG : e.getLocalizedMessage());
|
||||
return R.failed(SystemResultCode.SERVER_ERROR, errorMsg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user