Precise error typing in Swift

This looks like what you’re talking about, and you don’t need typed Errors for that:

1 Like