自动化立体仓库 - WMS系统
zhangc
2024-12-11 b67e67a182969b4dbfcd7eff423dca8c27f08683
src/main/java/com/zy/common/config/CoolExceptionHandler.java
@@ -21,16 +21,20 @@
    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
    public R handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
        e.printStackTrace();
        return R.error();
    }
    @ExceptionHandler(CoolException.class)
    public R handleRRException(CoolException e) {
        e.printStackTrace();
        String[] split = e.getMessage().split("-");
        if (split.length > 2) {
            return R.error(e.getMessage());
        if (split.length == 2) {
            if (String.valueOf(split[0]).length() < 3) {
                return R.parse(e.getMessage());
            }
        }
        return R.parse(e.getMessage());
        return R.error(e.getMessage());
    }
}