由于密码不匹配,我们调用reject(),因此“catch ”错误并将其发送到done()函数。 Since the passwords don't match, we call reject(), therefore“catching ” the error and sending it to the done() function. 在Java中,异常表示为Throwable对象,可以由try…catch 语句捕捉并处理。 In Java, an exception can be represented by an object of type Throwable that can be caught and handled in a try… catch statement. 在实践中,catch 块几乎总是具有断言(assertion)失败的特征。 In practice, the catch block almost always has the character of an assertion failure. 一旦执行了catch 语句,程序控制从整个try/catch机制的下面一行继续。 Once the catch statement has executed, program control continues with the next line in the program following the entire try/catch mechanism. Catch 块会捕捉到try块中的错误,并执行代码来处理它:.The catch block catches the error, and executes a code to handle it.
然后,在港口的一个国际海鲜餐厅Catch bySimonis吃晚饭时,吃一些新鲜的鱼。 Then, tuck into some fresh fish for dinner at Catch by Simonis in the harbour. 如果由于R原因,catch 块突然完成,则finally块被执行。 If the catch block completes abruptly for reason R, then the finally block is executed. 就像上面简单地删除掉catch 一样,我们可以在Promise版本中删去otherwise():. Similarly to simply cutting out the catch above, we can cut out the otherwise() in our Promise version. 如果发生了错误,catch 块可以回滚事务开始以来发生的所有更改,并打印出一条错误消息。 If something goes wrong, the catch block rolls back all changes made since the transaction was started, and then prints out an error message. 在任何异常情况下,catch 块信息都将保存在帧数据中。 In the case of any exception, the catch block information will be maintained in the frame data. 对于catch 语句来说,会创建一个新的变量对象,其中包含的是被抛出的错误对象的声明。 For a catch statement, a new variable object is created that contains the declaration of the thrown error object. 如果错过了添加catch ()方法,它将被代码吞噬。 If you miss adding a catch () method, it will be swallowed up by the code. 通常,catch 语句中的代码试图通过适当的操作纠正错误。 Usually, the code within a catch statement attempts to remedy an error by taking appropriate action. 除非不需要返回值,否则所有的try和catch 语句都必须拥有相同的返回值类型(和if语句一样)。 All the try and the catch expressions must have the same return type except when no value is needed(same as if). 如果发生了错误,catch 块回滚自事务启动以来发生的所有更改,并输出一条错误信息。 If something goes wrong, the catch block rolls back all changes made since the transaction was started, and then prints out an error message. 谁知道呢,您可能会看到老妇人在运河里洗衣服,或者看到一个渔夫用catch 捕鱼。 Who knows, you may see old women doing laundry in the canal or a fisherman using cormorants to catch fish. Swift会自动将错误传递到它们的生效范围之外,直到它们被catch 分句处理。 Swift automatically propagates errors out of their current scope until they are handled by a catch clause. MissingIngredients的条件,那么buyGroceries(_:)就会协同被catch 模式捕获的[String]值一起调用。 MissingIngredients case, then the buyGroceries(_:) function is called with the associated[String] value captured by the catch pattern. 她演的这两部电影是《后窗RearWindow》(1954)和《捉贼记ToCatch aThief》(1955)。 She would make two more pictures with Hitchcock: Rear Window(1954) and To Catch a Thief(1955). 特雷维西克继续他自己的实验,使用三个机车,最后与1808年的Catch MeCanCan结束。 Trevithick continued his own experiments using a trio of locomotives, concluding with the Catch Me Who Can in 1808.
Display more examples
Results: 381 ,
Time: 0.0237