Skip to content

Glossary: Swift Beyond the Basics

typed throws

Also written: throws(SyncError)

Writing `throws(SyncError)` to name the one error type a function throws. A `catch` then gets that exact type, so a `switch` can cover every case without `default`.

Where the book teaches it

Related terms

Resultfailable initializer