From ff3880f81c78d967f94bb91beabe6e719eecfc57 Mon Sep 17 00:00:00 2001 From: bqlin Date: Mon, 14 Jan 2019 09:47:03 +0800 Subject: [PATCH] =?UTF-8?q?17=5FError=5FHandling=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/chapter2/17_Error_Handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/17_Error_Handling.md b/source/chapter2/17_Error_Handling.md index eac4ed4e..4efce71f 100755 --- a/source/chapter2/17_Error_Handling.md +++ b/source/chapter2/17_Error_Handling.md @@ -199,7 +199,7 @@ do { ### 将错误转换成可选值 -可以使用 `try?` 通过将错误转换成一个可选值来处理错误。如果在评估 `try?` 表达式时一个错误被抛出,那么表达式的值就是 `nil`。例如,在下面的代码中,`x` 和 `y` 有着相同的数值和等价的含义: +可以使用 `try?` 通过将错误转换成一个可选值来处理错误。如果是在计算 `try?` 表达式时抛出错误,该表达式的结果就为 `nil`。例如,在下面的代码中,`x` 和 `y` 有着相同的数值和等价的含义: ```swift func someThrowingFunction() throws -> Int {