超时会抛出什么异常? [英] What Exception is thrown on timeout?

查看:497
本文介绍了超时会抛出什么异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTMLUnit中的连接超时引发了什么异常?

What Exception is thrown on connection timeout in HTMLUnit ?

推荐答案

HtmlUnit使用Apache HttpClient。超时机制抛出 InterruptedIOException

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

参见 HttpClient文档

此异常是IOException的子类,可以在任何HttpClient执行调用期间抛出(基本上每当您获取页面时使用HtmlUnit WebClient。

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.

这篇关于超时会抛出什么异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆