We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa1031c commit a17c980Copy full SHA for a17c980
language-guide/error-handling.md
@@ -136,7 +136,20 @@ struct PurchasedSnack {
136
137
`do-catch` 文の一般的な形式は次のとおりです:
138
139
-
+```swift
140
+do {
141
+ try <#expression#>
142
+ <#statements#>
143
+} catch <#pattern 1#> {
144
145
+} catch <#pattern 2#> where <#condition#> {
146
147
+} catch <#pattern 3#>, <#pattern 4#> where <#condition#> {
148
149
+} catch {
150
151
+}
152
+```
153
154
その句が処理できるエラーを示すには、`catch` の後にパターンを記述します。`catch` 句にパターンがない場合、句は全てのエラーに一致し、エラーを `error` という名前のローカル定数にバインドします。パターンマッチングの詳細については、[Patterns\(パターン\)](../language-reference/patterns.md)を参照ください。
155
0 commit comments