File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
TSPL.docc/ReferenceManual Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1465,8 +1465,7 @@ func <#function name#>(<#parameters#>) throws -> <#return type#> {
14651465}
14661466```
14671467
1468- A function that declares what error type it throws
1469- has the following form:
1468+ A function that throws a specific error type has the following form:
14701469
14711470``` swift
14721471func < #function name#> (< #parameters #> ) throws (< #error type#> ) -> < #return type#> {
@@ -1482,11 +1481,11 @@ Rule for inferring the thrown error type
14821481Xref to the guide <doc:ErrorHandling#Specifying-a-Concrete-Error-Type>
14831482-->
14841483
1485- A functions type includes whether it throws ,
1484+ A function's type includes whether it can throw an error ,
14861485and what type of error it throws.
1487- As a result , you can use a nonthrowing function
1486+ This means, for example , you can use a nonthrowing function
14881487in a context where a throwing one is expected.
1489- For more information, see < doc:Types#Throwing-Functions > .
1488+ For more information, see < doc:Types#Function-Type > .
14901489
14911490You can't overload a function based only on whether the function can throw an error.
14921491That said,
You can’t perform that action at this time.
0 commit comments