7.2 捕捉异常 (Catching an Exception) 可以利用单一或连串的catch子句来捕捉(catch) 被抛出的异常对象. 如果我们想要捕捉任何型别的异常, 可以用从catch-all的方式.
基于44个网页-相关网页
Catching an exception(捕获异常) The runtime system(运行时系统) searches for code to handle the thrown exception.
基于1个网页-相关网页
catching an exception
捕捉异常
以上为机器翻译结果,长、整句建议使用 人工翻译 。
When timeouts are expected, the cost of checking for null is lower than the cost of catching an exception.
当预料会超时的时候,检查是否为null的成本低于捕获异常的成本。
youdao
应用推荐
模块上移
模块下移
不移动