现在,再来考虑一下异常处理。
我们的第三个和最后一个讨论议题是异常处理。
您可以将该功能看作是异常处理的一种高级形式。
You can think of this facility as an advanced form of exception handling.
用于函数的异常处理程序的地址。
生产线材料异常处理。
异常处理应用程序块。
没有异常处理已经完成,并且该代码不是牢不可破的。
No exception handling has been done, and the code is not unbreakable.
可以轻松添加异常处理代码,以增加程序的可靠性。
Exception-handling code can be easily added to increase program reliability.
在本系列先前的技巧文章中,异常处理不属于讨论的核心范围之内。
In previous tips in this series, exception handling has been peripheral to our core discussion.
面向服务软件异常处理的开发工作量大且程序逻辑复杂。
The workload of exception handling development is heavy, with complex program logic.
您无法捕捉堆栈溢出异常,因为异常处理代码可能需要堆栈。
You cannot catch stack overflow exceptions, because the exception-handling code may require the stack.
异常处理,即使是个布尔变量,也会产生‘其它’,你可以不使用它。
'others' as a exception process, you can either use it or not.
在下一节中,您将对异常处理程序进行编码,以便处理SQLException异常。
In the next section, you will code your own exception handler to handle the SQLException.
如果不处理这个异常,常常会导致运行时故障。
This exception, if not handled, often causes a run time failure.
联盟将通过一个知识产权机制来处理这些异常。
The alliance will maintain an IP approval mechanism to handle these exceptions.
处理该操作所报告的任何异常。
专门处理每个异常。
检查返回值并处理异常。
处理异常要尽量与出现的问题紧密相关。
关键是不使程序崩溃或抛出异常而中止处理。
The key is to not crash your program or throw an exception that stops processing.
应该在整个应用程序中一致地处理异常。
You should handle exceptions coherently throughout the application.
如果出现问题,要捕获异常并加以处理。
If there is a problem, catch the exception and go from there.
可能还要确定某些未处理的异常。
You might also want to specify certain exceptions that are not handled.
调用者(即请求的发送者)负责处理异常。
The caller , in this case the sender of the request, is responsible for handling exceptions.
hypervisor还必须处理在来宾操作系统内部发生的异常。
The hypervisor must also handle traps or exceptions that occur within a guest.
首先,一个catch块中可以处理多个指定类型的异常。
First, multiple exception types can be named as being handled by a single catch block.
如何处理运行期间发生的异常?
捕获系统级异常的故障处理程序。
某个活动可能在发生意外异常时而停止(因此不会处理该活动)。
An activity can stop when an unexpected a "and therefore unhandled a" exception occurs.
某个活动可能在发生意外异常时而停止(因此不会处理该活动)。
An activity can stop when an unexpected a "and therefore unhandled a" exception occurs.
应用推荐