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)。
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)。
应用推荐