The key is to not crash your program or throw an exception that stops processing.
关键是不使程序崩溃或抛出异常而中止处理。
There were two options for what should happen when the retrieval timeout occurs: return null or throw an exception.
对于在检索超时发生时应当发生的事情,有两个选择:返回null或者引发异常。
In this class, you manipulate the server data and return a value to the client (or throw an exception, but let's stay optimistic for the moment).
在这个类中,将操作服务器数据并将值返回给客户机(或者抛出异常,但是此刻先让我们乐观一些认为不会出现这种情况)。
V8 will throw an exception if an error occurs - for example, when a script or function attempts to read a property that does not exist, or if a function is called that is not a function.
当错误发生时,v8会抛出一个异常。比如,当一个脚本或者函数试图去访问一个并不存在的属性,或者调用一个并不是函数的函数。
And the code that reads the file should check to make sure that the version number is less than or equal to its current version and throw an exception if it's not.
而读取文件的代码应该检查这个版本号,以保证版本号小于或者等于当前版本,否则就会抛出一个异常。
More support for testing whether code does or doesn't throw an exception.
为测试提供了更多的支持,无论代码是否抛出异常。
The checkRequest() function will throw an exception if the XMLHttpRequest object has not been created or if the request has already been sent.
如果还没有创建XMLHttpRequest对象,或者已经发送了请求,那么checkRequest()函数将抛出一个异常。
If we had added a getValue method to class Leaf, we would either have to return some sort of flag value indicating that the method application is non-sensical or actually throw an exception.
如果我们已经向Leaf类添加了getValue方法,我们要么是不得不返回一些类型的标志值表明此方法应用是无意义的,要么是实际抛出一个异常。
If you attempt to assign an SDO of a different SDO type (another author, perhaps) or a primitive, SDO would throw an exception.
若试图指派一个不同sdo类型的SDO(比如说,另外一名作者)或原生数据类型,SDO将抛出异常。
Normally, a DOM implementation must verify the correctness of operations and throw an exception if an application passes the wrong parameters or performs an illegal operation.
一般情况下,DOM实现必须检验操作的正确性,并在应用程序传递错误参数或者执行非法操作时抛出异常。
If the server script does not check the data, either the database will throw an exception or the database will be compromised.
如果服务器脚本不检查数据,要么数据库抛出异常,要么数据库安全会受到影响。
One very useful feature of slicing is that slicing too much, going before the start or past the end, doesn't throw an exception but simply defaults to the start or end of the sequence, as appropriate.
进行切片的一个非常有用的特性是,在开始之前或结束之后进行较多切片不会抛出异常,只是相应地以默认方式开始或结束该序列。
If the string can't be empty or must be in a specific format, check for the format and throw an exception.
如果字符串不能为空或者必须为特定格式,请检查格式并抛出异常。
Since Kid USES XML, all the templates must be well formed, or they will throw an exception during rendering.
由于Kid使用了XML,因此所有的模板都必须很好地进行格式化,否则在呈现时就会抛出异常。
For instance, you can add an exception or error name to the throw, catch, and uncaught events.
例如,可以在throw、catch和uncaught事件上添加异常名或错误名。
For example, you might throw an exception to signal that a routine could not execute normally-such as when a file is missing or data could not be parsed correctly.
例如,你可能会抛出一个异常来提示一个例程无法正常执行—例如当文件缺失或者数据转型错误。
To respond to user errors and to run-time error conditions such as network errors or permission failures, throw an exception.
若要响应用户错误和运行时错误条件(例如网络错误或权限失败),应引发一个异常。
To respond to user errors and run-time conditions such as network errors or permissions failures, throw an exception.
若要响应用户错误和运行时条件(例如网络错误或权限失败),请引发异常。
Setting the value to a negative number or a number higher than 12288 does not throw an exception but results in the control being set between 1 and 12288.
将这个值设定为负数或是大于12288的数字时,并不会掷回例外状况,但控制项还是会设定在1和12288之间。
Setting the value to a negative number or a number higher than 12288 does not throw an exception but results in the control being set between 1 and 12288.
将这个值设定为负数或是大于12288的数字时,并不会掷回例外状况,但控制项还是会设定在1和12288之间。
应用推荐