If the content isn't supported, the code throws an exception, which is caught by the try-catch block.
如果内容不受支持,那么代码抛出一个异常,此异常由try - catch块捕捉到。
To detect this bug pattern, you'll need to know where the try-catch blocks are, what might be thrown out of the try block, and what is caught in the catch blocks.
要检测此bug模式,则需要知道try - catch块的位置、try块可能抛出的内容以及在catch块中将捕获的内容。
From the SOAP client perspective, it's a good idea to wrap the SOAP call inside a try-catch block, so that SOAP faults like the one above can be caught and handled gracefully.
对于SOAP客户端来说,将这个SOAP调用封装在一个try - catch代码块中是很好的做法,这样类似于上面的SOAP错误就会被顺利地捕捉和处理。
When invoking unknown code (which listeners certainly qualify as), it is prudent to execute it in a try-catch block so that ill-behaved listeners do not do more damage than necessary.
在调用未知代码(侦听器就是这样的代码)时,谨慎的方式是在try - catch块中执行它,这样,行为有误的侦听器不会造成更多不必要的破坏。
Each CodeException contains the starting and ending bytecode offset for the corresponding try block, so you can easily determine which CodeException objects correspond to a try-catch block.
每个CodeException都包含相应try块的起始和终止的字节码偏移量,这样您可以方便地确定哪一个CodeException对象与try - catch块对应。
The SOAP method call is performed within a try - except block, which is generally good style, but here we do it specifically to catch a SOAP.faultType exception.
SOAP方法调用是在try -except块中执行的,一般来说,这种方式比较好,但这里我们这样做只是捕捉 SOAP.faultType异常。
This is why I used the try-except block: I can catch my own SQL errors and respond to them if needed.
这就是我使用try - except块的原因:我可以捕捉自己的SQL错误,并根据需要进行响应。
To use the doQuery method, you need to establish a database connection and call the method from within a try ... catch block, as shown in Listing 4.
要使用doQuery方法,需要建立数据库连接并且从try ...catch块内调用方法,如清单4 所示。
The command bean is instantiated and a try catch block is used to catch exceptions generated from a duplicate user, an invalid credit card, or an unauthorized credit card.
命令bean被实例化,try catch块被用于捕捉由于重复的用户、无效的信用卡或未经认证的信用卡而产生的异常。
Finally, the page USES a try block to catch any unforeseen errors with the error description displayed on the page.
最后,页面使用try块捕获任何不可预见的错误,并在页面上显示错误描述。
This is not a debugger bug, but it is known issue with try catch block debug information. See the following disassembled code for an example of a try catch block in the debugger.
这并不是调试器的bug,但是这是针对try catch块调试信息的一支问题。
Wrap steps 1 through 6 in a try/except block in order to catch any unexpected UDDIErrors (specifically, for a returned DispositionReport from the API).
为了捕获任何意料之外的UDDIError (特别是,API返回的DispositionReport ),把步骤1到6封装在一个try/except块中。
When an error occurs within a nested TRY block, program control is transferred to the CATCH block that is associated with the nested TRY block.
当嵌套的TRY块中出现错误时,程序控制将传递到与嵌套的TRY块关联的CATCH块。
If the stored procedure contains a TRY... CATCH construct, the error transfers control to the CATCH block in the stored procedure.
如果存储过程包含TRY…CATCH构造,则错误会将控制传输给存储过程中的CATCH块。
To report errors, exceptions are used, so do not forget to wrap your code in a try/catch block. That is all about using it.
这都是关于使用它显示的报告错误,使用异常,所以不要忘记您的代码封装在一个try /catch块。
To report errors, exceptions are used, so do not forget to wrap your code in a try/catch block. That is all about using it.
这都是关于使用它显示的报告错误,使用异常,所以不要忘记您的代码封装在一个try /catch块。
应用推荐