[pigeon][swift 6]use typed throw for swift codegen
Open
p: pigeon
P3
package
platform-ios
team-ios
triaged-ios
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
Swift 6 introduces ["typed throws"](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0413-typed-throws.md):
```
func foo() throws(MyError) { … }
do {
try foo()
} catch {
// error here is of type MyError (rather than of type `Error`)
}
```
A good way to force developers to throw `PigeonError`.
Only available for Swift 6 though, so will need to fix all the concurrency warnings before we can use it.
Contributor guide
Assessment
This issue has not been assessed yet.