I’ll just cut to the chase: Why is throwing from get, set, willSet and didSet disallowed?
var login: String {
willSet throws {
guard newValue.count > 5 else {
throw LoginError.loginTooSmall
}
}
}
try login = “JebediahKerman” // totally fine
try login = “Bob” // throws `LoginError.loginTooSmall`
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
