If yes, what checked exceptions will be thrown?
如果是的话,抛出何种检查过的异常?
Reporter: C# doesn't have checked exceptions.
记者:C#没有受控异常。
The difference is that in Groovy there are no checked exceptions.
区别在于,Groovy没有已检测的异常。
Will methods in the DAO's public interface throw checked exceptions?
DAO的公共接口中的方法是否抛出检查过的异常?
One problem with checked exceptions is that sometimes you simply aren't allowed to throw them.
checked异常的一个问题是,有时候不允许抛出这样的异常。
It's also easy to forget to use finally when the code that USES the resource doesn't throw checked exceptions.
很容易忘记在使用资源的代码不抛出已检查的异常时使用finally。
I know you've written some about checked exceptions too, and you tend to agree with our line of thinking.
我知道你也写了一些关于受控异常的资料,你应该 会同意我的看法。
The code in Listing 2 ignores several possible types of checked exceptions thrown by the various reflection methods.
清单2中的代码忽略了不同反射方法抛出的多种可能选中的例外类型。
Checked exceptions inherit from exception class and are used to handle recoverable errors such as business error scenarios.
已检查异常继承自exception类并用于处理可恢复性出错诸如业务出错场景。
Methods in the DAO interface should throw checked exceptions only if the caller can reasonably be expected to handle the exception.
只有在可以合理地预期调用者可以处理异常时,DAO接口中的方法才应该抛出检查过的异常。
If checked exceptions caused an automatic rollback, the entire book order would be rolled back just because the E-mail server was down.
如果受控异常引起自动回滚,整个图书订单就会由于电子邮件服务器的关闭全部回滚。
Unlike RMI, these services don't have checked exceptions (though clearly, if a communication error occurs, a RuntimeException will be thrown).
不像RMI那样,这些服务无需checked exception(很明显,如果发生了通信错误则会抛出RuntimeException)。
The ServiceLocator can also translate the checked exceptions (that get thrown during lookup or creation of the bean) into unchecked exceptions.
ServiceLocator还可以将检查的异常(在Bean查找或创建过程中引发的异常)转换为未经检查的异常。
First of all, not all checked exceptions are bad; they might be used for event notification or to redirect processing based on certain conditions.
首先,不是所有受控异常都是不好的;它们可用于事件通知或根据某些条件重定向处理。
Because checked exceptions are part of a method's signature, you can't add one to an overriding variant any more than you can change its return type.
因为checked异常是方法签名的一部分,在覆盖方法时,不能增加checked异常,就像不能改变return类型一样。
This article first discusses the expected behaviour on the client when the server throws various exceptions, and then emphasizes the use of checked exceptions.
本文首先讨论了当服务器抛出不同的异常时客户端的预期行为,然后强调了已检查的异常的使用。
For the method call instructions, you use Bytecode Engineering Library (BCEL) classes to extract the types of checked exceptions the method is declared to throw.
对于方法调用指令,可以使用BytecodeEngineeringLibrary (BCEL)类来提取方法声明抛出的已检查异常的类型。
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)。
It has an awkward static method factory-based API instead of an object-oriented one, and you are forced to catch checked exceptions that may never need to be caught.
MessageDiges t类有一个笨拙的基于工厂的静态方法api,它不是面向对象的,并且你被迫去捕获那些永远都不必捕获的Checked Exceptions。
A good programming practice often involves explicitly defining checked user exceptions as part of the interface contract.
良好的编程实践通常包括显式地定义已检查用户异常作为接口契约的一部分。
A good programming practice often involves explicitly defining checked user exceptions as part of the interface contract.
良好的编程实践通常包括显式地定义已检查用户异常作为接口契约的一部分。
应用推荐