Avatar
typed throws、do throws(XXXError)という新しい構文も追加したいということでレビューが延期されましたね。 https://forums.swift.org/t/extended-se-0413-typed-throws/68741 do throws(CatError) { if isDaylight && foodBowl.isEmpty { throw .sleeps // equivalent to CatError.sleeps } try callCat() } catch let myError { // myError is of type CatError } (edited)
The review period for SE-0413 was scheduled to end today. I am extending it for another week to allow discussion of a late-breaking modification suggested by @beccadax to allow explicit specification of what type may be thrown by a do block. The review period now runs through December 7. The following post on the original thread links to the PR...