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

page status code error 404时, 没有进入process #1164

Open
PosiedChoss opened this issue May 14, 2024 · 0 comments
Open

page status code error 404时, 没有进入process #1164

PosiedChoss opened this issue May 14, 2024 · 0 comments

Comments

@PosiedChoss
Copy link

在编写一个小功能的时候, 发现了这个问题

public class GetUserInfo implements PageProcessor {
  private static final Logger log = LoggerFactory.getLogger(GetUserInfo.class);
  private Site site = Site.me()
  @Override
  public void process(Page page) {
      log.info("调试信息" + page.getStatusCode());
  }
  @Override
  public Site getSite() {
      return site;
  }
}

当页面可正常获取数据时, 日志的输出是这样的
image
而当页面返回404时, 调试信息却没有正常输出
image

还是说有其他的办法专门处理错误码的情况, 如果有, 劳烦大佬们告知, 感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant