Skip to content

Commit d4b33e2

Browse files
authored
Fix placement of 'throws' in function signatures (#359)
2 parents 730309b + f451001 commit d4b33e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TSPL.docc/LanguageGuide/ErrorHandling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ You can call a function that uses typed throws
802802
from within a regular throwing function:
803803

804804
```swift
805-
func someThrowingFunction() -> throws {
805+
func someThrowingFunction() throws {
806806
let ratings = [1, 2, 3, 2, 2, 1]
807807
try summarize(ratings)
808808
}
@@ -814,7 +814,7 @@ You could also write the error type explicitly as `throws(any Error)`;
814814
the code below is equivalent to the code above:
815815

816816
```swift
817-
func someThrowingFunction() -> throws(any Error) {
817+
func someThrowingFunction() throws(any Error) {
818818
let ratings = [1, 2, 3, 2, 2, 1]
819819
try summarize(ratings)
820820
}

0 commit comments

Comments
 (0)