Skip to content

Commit

Permalink
更新错误提示
Browse files Browse the repository at this point in the history
  • Loading branch information
xiandanin committed Aug 1, 2019
1 parent ae934a9 commit 8282e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public BaseResponse<MagnetPageData> filter(@RequestParam String input) {
return BaseResponse.error("服务器繁忙");
}
} catch (Exception e) {
return BaseResponse.error("添加失败");
return BaseResponse.error(e.getMessage());
}

}
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/in/xiandan/magnetw/service/FilterService.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ public void init() {

public boolean add(String input) throws Exception {
if (!completed) {
return false;
throw new Exception("系统繁忙,请稍候再试");
}
//如果是占位符
if (input.toLowerCase().equals(config.searchPlaceholder.toLowerCase())) {
throw new Exception("暂不支持屏蔽占位搜索词");
}
if (mFilterList.contains(input)) {
return true;
Expand Down

0 comments on commit 8282e11

Please sign in to comment.