4 ms·
I scanned through almost all of the posts on the feedback wiki, and this was the only one I saw which addresses handling recoverable errors. Recoverable errors
by maddyboo 8y ago
I scanned through almost all of the posts on the feedback wiki, and this was the only one I saw which addresses handling recoverable errors.
Recoverable errors are definitely a thing, but the original error handling proposal forces the handler chain to eventually return, making it impossible to continue function execution [1]:
> If the enclosing function has result parameters, it is a compile-time error if at the point of any check expression none of the handlers in scope is a terminating statement. Note that the default handler ends in a terminating statement.
As suggested in section H of this post, I think `break` or a similar mechanism inside handlers would be very useful.
[1]: https://go.googlesource.com/proposal/+/master/design/go2draft-error-handling.md#summary https://go.googlesource.com/proposal/+/master/design/go2draf...