" Writing good exceptions" (developerWorks, May 2003) offers some practical advice on throwing and catching exceptions and refining your exception-handling sensibilities.
“ 编写出色的异常 ”(developerWorks, 2003 年 5 月)提供了一些关于抛出和捕获异常以及改善异常处理灵敏度的一些实际建议。
When timeouts are expected, the cost of checking for null is lower than the cost of catching an exception.
当预料会超时的时候,检查是否为null的成本低于捕获异常的成本。
Also note that Objectify's exceptions are unchecked - which means I don't have to worry about catching a bunch of exception types.
还要注意,Objectify的异常未经检查—这表示我无需担心捕捉到很多exception类型。
应用推荐