Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(基础模块): 优化excel导入数字类型格式错误提示 #356

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ public static class Importing<T> {

public String getErrorMessage() {
//todo 更多异常信息判断
if (error instanceof NumberFormatException) {
String msg = error.getMessage();
if (msg.contains("\"")) {
String ch = msg.substring(msg.indexOf("\"") + 1, msg.lastIndexOf("\""));
return LocaleUtils.resolveMessage("error.number_format_error", "无法转换["+ch+"]为数字",ch);
}
}
return error == null ? null : error.getLocalizedMessage();
}

Expand Down