swift-book
swift-book copied to clipboard
Correct Throwing Functions and Throwing Methods
Location
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/declarations#Throwing-Functions-and-Methods
Description
The second paragraph misstates what is required:
Calls to a throwing function or method must be wrapped in a try or try! expression (that is, in the scope of a try or try! operator).
Correction
Reword the paragraph to:
Calls to a throwing function or method must be wrapped in an expression with a try operator (that is, in the scope of a try, try?, or try! operator).