抛出异常
- 网络throw;Throwing an Exception;throw exception
-
这段代码不会像预期那样向TRADE表插入交易订单,也不会抛出异常。
This code will not insert the trade order into the TRADE table as expected , nor will it throw an exception .
-
在以后的版本中,Google断言宏可能会在平台上抛出异常。
The Google assertion macros may throw exceptions in platforms where they are enabled in future releases .
-
如果多个服务器端form出现在同一个webform上,将抛出异常。
If multiple server forms are declared in the same Web Form , an exception is thrown .
-
在默认情况下,若InformixDynamicServer无法立刻获取某一锁定,就会抛出异常。
By default , Informix Dynamic Server throws an exception if it cannot acquire a lock immediately .
-
如果在第二个try语句运行期间抛出异常,那么请注意,result变量被设置为false。
If an exception is thrown during the second try statement , notice that the result variable gets set to false .
-
如果出现任何问题,Hibernate将会抛出异常。
If a problem occurs , Hibernate will throw an exception .
-
注意,如果每件事都按计划进行,那么在每件事都成功提交到数据库,而且没有抛出异常之后,result变量应当等于true。
Notice that if everything goes as planned , the result variable will equal true after everything is successfully submitted into the database and no exceptions are thrown .
-
我们可以尝试典型的Javanull参数,但是这样做会在运行时抛出异常。
We can try the classic Java null parameter , but doing so throws an exception at run time .
-
如果没有正确地缩进,Python解释器会抛出异常。
If you don 't properly indent , the Python interpreter throws an exception .
-
由于Kid使用了XML,因此所有的模板都必须很好地进行格式化,否则在呈现时就会抛出异常。
Since Kid uses XML , all the templates must be well formed , or they will throw an exception during rendering .
-
使用未知的用户名和/或密码进行尝试,以了解SAP如何抛出异常。
Try with an unknown username and / or password to see how SAP throws an exception .
-
如果您只想在遇到未定义的情况时抛出异常,那么就没必要使用落后的(object,object)模式对xwithy()进行初始化。
The initialization of x_with_y () with a fallback ( object , object ) pattern is not necessary if you simply want undefined cases to raise an exception .
-
因此借助调试器,如windbg.exe,可以把它附在进程上,等待EPR被抛出异常,做一个memorydump。
We can attach to the process , wait for epr to be thrown and take a memory dump .
-
经常,您只需要检测是否出现了某个异常,如果是则立即返回Java代码以便抛出异常。
Often you can simply check if an exception has occurred and if so return immediately to Java code so that the exception is thrown .
-
Dispose仍然会抛出异常,但并非总是会通知你某些事情发生错误。
Dispose can still throw , but it won ' t_always_notify you that something went wrong .
-
通过将您希望抛出异常的类类型的@Test注释的值设置为expected,可以使JUit提前预测到这种错误。
You can prime JUnit to expect this failure by setting the expected value on the @ Test annotation of the class type you expect to be thrown .
-
dynamic块中的所有代码都能够支持潜在需要的动态查找功能&哪怕代码中尝试访问的成员并不能在编译时确定,编译器也不会抛出异常。
All the code that occurs in a dynamic block will potentially support dynamic lookup ; even if the accessed members are not known by the C # compiler to exist , it will allow the code .
-
因此,Close()方法会接收一个Timeout参数,并包括一个异步版本(因为它可能阻塞线程),而且Close()还会抛出异常。
As a consequence , Close () takes a Timeout and has an async version ( since it can block ), and also Close () can throw Exceptions .
-
对本例中的Girl调用这种函数将会使该对象处于不一致的状态,因为kiss方法将抛出异常。
Calling such an instructor on the Girl in this example would leave the object in an inconsistent state because the kiss method would throw an exception .
-
不要抛出异常(getter)
Not throw an Exceptions ( getter )
-
(否则,Derby将在尝试创建一张已经存在的表时抛出异常)。
( Otherwise , Derby would throw an exception when it tried to create a table that already existed ) .
-
如果联接条件的评估失败,例如,在执行Java实现的联接条件时抛出异常,则停止原因为ACTIVATIONFAILED。
If the evaluation of the join condition fails , for example , an exception is thrown during the execution of a Java implemented join condition , the stop reason is ACTIVATION_FAILED .
-
WCF客户端的首要问题是Close/Dispose方法会抛出异常。
The first problem with WCF clients is that the Close / Dispose method can throw an exception .
-
remove()的行为与Collection接口的版本相似,但是新的poll()方法在用空集合调用时不是抛出异常,只是返回null。
While remove () behaves like the Collection interface version , instead of throwing an exception when called with an empty collection , the new poll () method just returns null .
-
如果源端口类型中至少有一个元素没有被复制,那么将抛出异常,并显示错误消息Duplicatesarenotallowed。
If at least one element in the source port type is not duplicated , the drop happens and the error message Duplicates are not allowed is displayed .
-
通过标注指定这个约束条件意味着我的代码不再会被重复的条件弄得乱七八糟,这些条件检查null值,并且一旦找到该值就会抛出异常。
Specifying this constraint through annotations means I no longer need to litter my code with repetitive conditionals that check for null and throw an exception on finding it .
-
filelock类的构造函数接受要锁定的文件的名称,一定要在调用lock之前打开文件;否则会抛出异常。
The constructor for the file_lock class accepts the name of the file to be locked , and it 's important to open the file before lock is invoked ; otherwise , an exception will be thrown .
-
原来的JAXB代码无条件地验证文档的结构,如果发现错误,则抛出异常并中止处理。
The original JAXB code unconditionally verified the structure of documents , throwing an exception and aborting the processing if an error was found .
-
如果选择这种方法,那么在调用组件时,需要在调用EIS代理的方法之前启动一个事务,否则就会抛出异常。
If you chose this approach , the calling component would need to start a transaction prior to calling methods on the EIS facade , or an exception would be raised .
-
如果其中一个更新失败,那么可以向UI层重新抛出异常,退出该方法,不再更新EIS2。
If one of the updates fails , you can re-throw the exception to the UI tier and exit the method without attempting to update EIS2 .