not sure it’s been addressed in this thread, however:
what if there are, say two different errors, that can occur:
let? r = myFunc()
let’s say I can handle and recover ErrorA but not ErrorB? in case of ErrorA i want to do something, but in case of ErrorB i want it to propagate and early-return:
let r = switch getConn() {
| Ok(x) => x
| Error(ErrorA) =>
reconnectAndGetConn() // hypothetical recover
| Error(ErrorB) =>
return Error(ErrorB) // not possible?
}
how does this proposal handle the above scenario?