-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: Go2 error handling for error-tree #32099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like there are two ideas here. One is an "error tree" type that can collect multiple errors. It seems that this type is itself an error, but it can also represent the state of there being no errors. So it is already incompatible with the basic property of Go error handling, that there is an error if and only if The second idea is some new syntax for automatically collecting errors into an error tree. That results in simpler control flow (no
we erroneously pass a garbage |
Yes, @jba, you are right. Syntax
but in that case we will not see error from function |
@Konstantin8105 what are the problems and solution requirements that motivated your proposal? FYI, I've collected a menu of Requirements to Consider for Go 2 Error Handling. Also, please feel free to add a link to your proposal to the wiki: |
Now, I add to wiki https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback |
Thanks for this proposal. This combines error handling and error values into a single proposal. But the idea is somewhat complicated: it requires a builtin type more complicated than We aren't going to adopt this idea. |
Please add into wiki Go2ErrorHandling, my proposal for error handling in error-tree. Preview:
In detail see: Go2ErrorTree
The text was updated successfully, but these errors were encountered: