swift-book icon indicating copy to clipboard operation
swift-book copied to clipboard

Correct Throwing Functions and Throwing Methods

Open tadbyt opened this issue 1 year ago • 0 comments

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).

tadbyt avatar Jan 30 '24 20:01 tadbyt