不要重复释放同一对象。检查异常处理代码的情况。
Make sure there's no code path where the same object is released more than once. Check error code paths.
可以轻松添加异常处理代码,以增加程序的可靠性。
Exception-handling code can be easily added to increase program reliability.
您无法捕捉堆栈溢出异常,因为异常处理代码可能需要堆栈。
You cannot catch stack overflow exceptions, because the exception-handling code may require the stack.
一般来说,读写代码和异常处理代码都变得比以前更加的清晰。
In general, reading, writing, and debugging code becomes much clearer with exceptions than when using the old way of error handling.
向TopType方法中手工添加异常处理代码,保证只能提供可以转化成布尔值的字符串。
Manually add exception handling to the TopType methods to ensure only string values that can be converted to booleans are supplied.
通过在应用程序中放置异常处理代码,可以处理用户可能遇到的大多数错误并使应用程序能够继续运行。
By placing exception handling code in your application, you can handle most of the errors users may encounter and enable the application to continue running.
极大地减少用于数据转换和异常处理的繁琐代码,从而专注于核心业务逻辑。
Significant reduction of tedious code for data conversion and exception handling, allowing you to focus on core business logic.
为避免分散注意力,我已在代码中忽略了异常处理。
To avoid distractions I've ignored exception handling in the code.
正是由于这个微妙的原因,让运行时异常成为代码要处理的外部状况是一个坏主意。
Indeed this subtlety is precisely why run-time exceptions are a bad idea for external conditions that should be handled by code.
如下面的代码所示,发现所有的异常并正确的处理他们仍是明智之举。
It is still advisable that you catch all exceptions and handle them appropriately, as shown in the following code.
异常处理与代码本身所用时间一样多。
The exception handling takes as much time as the code itself.
新的面向对象特性和异常处理的增加为将代码从PHPV 4迁移到PHP V5提供了强有力的理由。
The new object-oriented features and the addition of exception handling provide compelling reasons for migrating your code from PHP V4 to V5.
事务使我们能够将很多异常处理和恢复工作委托给TPM 和RM,从而简化了我们的代码,并使我们能够空出更多时间来考虑应用程序逻辑。
Transactions enable us to delegate many elements of exception handling and recovery to the TPM and the RMs, simplifying our code and freeing us to think about application logic instead.
使用JNI代码本地处理异常,尽管有时不可避免地会导致性能下降。
Handling exceptions natively in the JNI code itself, though unavoidable sometimes, leads to performance degradation.
原来的JAXB代码无条件地验证文档的结构,如果发现错误,则抛出异常并中止处理。
The original JAXB code unconditionally verified the structure of documents, throwing an exception and aborting the processing if an error was found.
处理程序代码可以使用这些回调中传递的信息,但是不能影响解析过程(除了引发一个异常)。
Your handler code can make use of the information passed by the call-backs, but cannot affect the parsing (except by throwing an exception).
例如,在新api中为粘结代码提供了异常处理和约定的支持。
For example, it supports exceptions and promises far less glue code for new APIs.
这意味着如果在代码中,我得到一个这样的异常,我能到这里来处理它。
What does that say? It says if in the code up here I get an exception of that sort, I'm going to go to this place to handle it.
在代码中处理SQL异常并运行应用程序,以此判断SQL是否有效。
Handle SQL exceptions in your code and run your applications to find out whether the SQL is valid or invalid.
在提供者代码中必须显式地处理异常。
This is something which must be handled in the provider code explicitly.
任何的代码都可以添加When去决定是否要处理某个异常。
Any arbitrary code can enter a When block to decide whether or not to handle an Exception.
问题在于,尽管代码处理了初始getfieldid未返回字段id的情况,但它并未清除此调用将设置的异常。
The problem is that even though the code handles the case in which the initial GetFieldID doesn't return the field ID, it does not clear the exception that this call would set.
关于这个问题,有一点值得注意:尽管本系列中的示例使用 try-catch() 代码块来捕捉和处理异常,但这并不是必须的。
While on the subject, it's worth noting that although the examples in this series use try-catch() blocks to trap and handle exceptions, this isn't strictly necessary.
所有脚本引擎eval方法都声明抛出一个ScriptException,因此我们的代码需要适当处理这些异常。
All script-engine eval methods declare they throw a ScriptException, so your code needs to handle it appropriately.
清单2中的代码给出了一个针对文件(IOException)和数字转换(ParseException)错误的异常处理结构。
The code in Listing 2 represents an exception-handling structure for file (IOException) and number conversion (ParseException) errors.
您可为块定义模板,这样代码中即可包含您的企业中要用到的任何定制特性,例如定制的异常处理。
You can define the templates for the blocks, so the code can include any customized features you use in your enterprise — like custom exception handling.
如果没有异常出现,也就是插件节点的处理过程是成功的,ESQL代码将继续执行下去。
If no exception occurs, that is, the processing of the plug-in node was successful, the ESQL code proceeds.
注释:必要的异常处理逻辑已经排除在这篇文章中的大多数样例代码,这主要是为了代码更清晰。
Note: The necessary exception handling logic has been excluded for clarity in most of the code examples in this article.
第二,代码调用一个可能抛出异常的方法,但没有处理该异常。
The second is that the code calls a method that can throw an exception without handling it.
由于此代码仅仅作为样例使用,我们没有执行任何实际的错误处理,但是我们实现了一个虚构的异常处理程序,从而完成代码的编译。
Because this code is only a sample we don't perform any real error processing, but we do implement a dummy exception handler to allow the code to compile.
应用推荐