What Exception is thrown on timeout?

妖精的绣舞 提交于 2019-12-08 05:18:29

HtmlUnit uses the Apache HttpClient. The timeout mechanism throws an InterruptedIOException.

See the HttpClient documentation.

This exception is a subclass of IOException, which can be thrown during any HttpClient execute call (basically whenever you get a page with an HtmlUnit WebClient.

metoo

I think there is a bug, it really should throw a exception but dont throw if you set an timeout great than a value, you can see it in (Call getPage from htmlunit WebClient with JavaScript disabled and setTimeout set to 10000 waits forever)

Thanks a lot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!