他总是使用异常复杂的法律词语。
使用异常事件的一般规则如下。
最终是从方法中使用异常。
An exception is ultimately used by being raised from an operation. Here is an example.
清单13显示了使用异常时代码的清晰程度。
Listing 13 shows how much cleaner the code is when you use exceptions.
简而言之,合理使用异常,切勿返回错误代码。
In brief, use exceptions properly and never return error codes.
如果不使用异常,则必须返回错误代码。
异常设计准则讨论了使用异常的许多好处。
Design Guidelines for exceptions discusses many of the benefits you get by using exceptions.
或者,更准确地说,他们没有以我认为最好的方法来使用异常。
Or, perhaps more precisely, they don't use them the way I think best.
几乎总是,使用异常影响“正常”的流量是一个坏主意。
Almost always, using exceptions to affect the "normal" flow is a bad idea.
应用程序可以使用异常来确定是否对用户禁用某项功能。
Your application can use the exception to determine whether a feature should become disabled for the user.
他也在书中包括了很实用的建议:用接口替代抽象类和灵活使用异常。
He also includes practical advice on using interfaces instead of abstract classes, and using exceptions intelligently.
所以除了业务需求和规章外,策略也可能被强制使用异常,或者要求转换。
So in addition to business requirements and regulations, policies may also be enforced using exceptions or require transformation.
类似地,把第二个框设置为GPS和传感器的使用量,找出使用异常的进程。
Proceed the same way with GPS and Sensors usage and look for any abnormal intensive processes.
在开发工作中许多语言采用了一种有用的技术 - 使用异常系统内置的内省。
One technique that's useful during development work with many languages is to use the exception system's built-in introspection. This turns our example into something like this
帧函数是分配堆栈空间、调用其他函数、保存非易失寄存器或使用异常处理的函数。
A frame function is a function that allocates stack space, calls other functions, saves nonvolatile registers, or USES exception handling.
某些派别的信徒支持使用异常来检查参数和其他的前置条件,使用错误编码来报告程序中出错的处理。
Some disciples espouse using exceptions to check parameters and other preconditions, and error codes to report processing errors within the function.
因此,在某个特定开发项目中,使用异常的第一步,也往往是最容易被忽视的一步,就是确定程序对异常的需求。
The first step in using exceptions in a particular development project, therefore, and much the most-neglected one, is to determine your program's requirements for exceptions.
如果发生错误(例如删除记录时违反了参照完整性),Update和Delete按钮则使用异常处理程序来显示出错消息。
The Update and Delete buttons use exception handlers to display the error message if something goes wrong (such as referential integrity violations when deleting a record).
您的信号给供应商,要满足他的条件和在某些情况下,例如,你可以准备好了价格的上涨(在这里,你应该使用异常条件)。
You signal to your supplier that you want to accommodate his conditions and e. g. under certain circumstances you could be ready for a price rise (here you should use the conditional as an exception).
你可能并不想深入文件系统的底层了解这些东西,但本文介绍的技术对于你理解文件系统的使用异常重要,因为存在数据丢失的风险。
You may not have wanted to get so in-depth with your file system but the techniques covered here are pretty important to understand particularly because there is a risk of data corruption.
巴氏涂片可以检测异常细胞,这些细胞是癌症的前兆,可以使用激光等技术来摧毁它们。
Pap smears work by detecting abnormal cells that are cancer precursors and that can be destroyed using techniques like lasers.
当使用法呢基转移酶抑制剂防止这种法呢基化时,核形状的异常显着降低。
When this farnesylation is prevented using farnesyltransferase inhibitor, the abnormalities in nuclear shape are significantly reduced.
您必须使用这种异常机制,除非客户机已经了解期望的数据项数量。
You must use this exception mechanism unless the client already knows how many data items to expect.
相反,您应该对此类条件使用未经检查的异常,以便能够可选地处理这些条件。
Instead, you should use unchecked exceptions for such conditions, so that you can optionally handle these conditions.
限制异常的使用。
下面的类图展示该例中使用的不同异常类。
The next class diagram shows the different exceptions classes used in this example.
超时元素实际上是在异常事件中使用的事件元素。
The timeout element is actually an event element, which is used inside an exception element.
维持,WSCI使用了异常元素。
维持,WSCI使用了异常元素。
应用推荐