This response should throw an exception because the temperature value is not a float type — it is actually a string.
这个响应会抛出一个异常,因为温度的值不是浮点类型—它实际上是一个字符串。
Throw an exception at run time when there is no matching constructor.
当没有匹配的构造函数时,抛出运行时异常。
To deal with this, you can generate a stack trace in the constructor of the exception object during the throw exception statement.
为了解决这一问题,可以在抛出异常语句期间,在异常对象的构造函数中生成一个堆栈跟踪。
Throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
只要泛型类的运行时实例化没有包括所需的构造函数,就抛出异常。
When determining what type of exception to throw, you should always first consider the tier that will handle the reported exception.
当决定抛出何种类型的异常时,您应该总是首先考虑将要处理所报告异常的层。
Unless you change this property, a command that runs for over 30 seconds will time out and throw an exception.
除非更改此属性,否则运行30秒后,命令就会超时,并且将抛出一个异常。
If such classes are not available at runtime, it'll throw that exception.
如果这样的类在运行时不可用,它会抛出该异常。
If a query USES a combination of columns that are not indexed, GAE will only throw an exception at run time when the query is executed.
如果查询使用没有进行索引的列的组合,那么当执行查询时,GAE将只在运行时出现一个异常。
The same program running as a standalone EXE may not throw the exception.
而同样的程序作为一个单独的EXE运行时可能不会抛出异常。
Your application can throw this subclass exception and your client would receive this exception.
您的应用程序可以抛出这个子类异常,并且您的客户将接收到这个异常。
So this API is to invoke a service where that does not have a return value but that could throw an exception.
因此,此api用于调用并不返回值但可能引发异常的服务。
This service code is generated in the form of a skeleton implementation, with service methods that just throw an exception.
此服务代码以框架实现的形式生成,其中包含直接引发异常的服务方法。
This attribute is a hint to the compiler that the function declared with this attribute and the subsequent functions it calls do not throw an exception.
这个属性可以告诉编译器,使用该属性声明的函数以及它调用的后续函数都不会引发异常。
This is important to know if you are expecting your test to throw an exception.
在预料到测试会抛出异常时,这一点很重要。
Throw a read-only connection exception
抛出一个只读连接异常
If the criterion is not met you can raise an exception using the Throw node.
如果不满足条件,您可以使用Throw节点引发一个异常。
No. 2: Throw an exception when needed constructor is missing.
第2种方法:当缺少所需构造函数时,抛出异常。
If the list is null, require will throw an exception.
如果这个列表是null,require会抛出一个异常。
And yes, you throw an exception by writing throw new MyBadException (...).
而且一样的,你可以通过写thrownew My BadException(…)来抛出异常。
There were two options for what should happen when the retrieval timeout occurs: return null or throw an exception.
对于在检索超时发生时应当发生的事情,有两个选择:返回null或者引发异常。
Throw exception: If an error is encountered, an exception is thrown and the operation is not performed.
Throw exception:如果突然出现一个错误,抛出一个异常,操作不能执行。
Otherwise, it should throw an exception.
否则,它应抛出异常。
Ensure that your NL product, once released, will not throw an exception due to missing keywords from the translated files.
确保您的本地语言产品一旦发布将不会由于已翻译文件遗漏关键字而抛出异常。
The basic program in Listing 1 contains three methods that can all throw an exception.
清单1中的基本程序包含三个方法,这三个方法都可抛出异常。
If the server script does not check the data, either the database will throw an exception or the database will be compromised.
如果服务器脚本不检查数据,要么数据库抛出异常,要么数据库安全会受到影响。
Otherwise, it will throw a custom exception.
否则,抛出一个定制的异常。
More support for testing whether code does or doesn't throw an exception.
为测试提供了更多的支持,无论代码是否抛出异常。
Of course, those functions don't have any implementations yet, so calling them will just throw an exception.
当然,那些函数也没有任何实现,所以调用它们将只抛出异常。
When you publish it to outside clients, you want to check the arguments and throw an exception if the arguments are invalid.
当你将它向外界的客户公布时,你要检查实参并且如果实参无效,你要给出一个例外。
If you separate the operations that can throw an exception from those that can't, the problem becomes more tractable.
如果将可能抛出异常的操作与不会抛出异常的操作分开,那么问题就更容易处理了。
应用推荐