Also note the continuing pattern of unchecked exceptions, which keeps the code remarkably concise.
还要注意,这里仍然对异常未加检查,这将使代码异常简洁。
While most of the time, we never intend to throw unchecked exceptions, it does sometimes happen anyway.
虽然大多数时候,我们不会故意抛出未检测异常,但是确实有些时候会发生这种情况。
Instead, you should use unchecked exceptions for such conditions, so that you can optionally handle these conditions.
相反,您应该对此类条件使用未经检查的异常,以便能够可选地处理这些条件。
You don't have to handle exceptions at this level because Spring translates them to a common set of unchecked exceptions.
您不必在这个级别上处理异常,因为Spring 将它们转换为一套通用的未检查异常(unchecked exceptions)。
Test failures are indicated by throwing unchecked exceptions, typically by using JUnit-provided assertion and failure methods.
测试失败通过抛出未经检查的异常来指示,通常使用JUnit提供的断言和故障方法指示。
The ServiceLocator can also translate the checked exceptions (that get thrown during lookup or creation of the bean) into unchecked exceptions.
ServiceLocator还可以将检查的异常(在Bean查找或创建过程中引发的异常)转换为未经检查的异常。
For example, if the stock exchange system runs into a problem, the service might fail to obtain the quote with some kind of unchecked exceptions.
例如,如果股票交易系统遇到问题,则该服务可能因某种未经检查的异常而无法获得报价。
Using introduction, aspects can add new methods and variables to a class, declare that a class implements an interface, or convert checked to unchecked exceptions.
使用引入(Introduction),Aspect可以向类中添加新的方法和变量、声明一个类实现一个接口或将检查异常转换为未检查异常(unchecked exception)。
Unchecked exceptions which are descendents of RuntimeException class are the ideal candidate exceptions handle non-recoverable errors such as resource non-availability or some null Pointers.
未检查异常作为运行时exception类是理想的异常侯选处理不可恢复性出错,如资源不可用或者空指针。
As mentioned previously, the exceptions in this hierarchy are unchecked.
正如前面提到过的,此层次结构中的异常未经检查。
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类型。
Use unchecked, run-time exceptions to report serious unexpected errors that may indicate an error in the program's logic.
使用不需检查运行时异常来报告严重的、无法预期的错误,这可能指出程序逻辑中的错误。
Use unchecked, run-time exceptions to report serious unexpected errors that may indicate an error in the program's logic.
使用不需检查运行时异常来报告严重的、无法预期的错误,这可能指出程序逻辑中的错误。
应用推荐