-
Notifications
You must be signed in to change notification settings - Fork 32
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
Error cascade #76
Error cascade #76
Conversation
Also return the right exit error code when errors are encountered.
bbaa5b7
to
94a36f6
Compare
…allowing for the opportunity of better state clean-up.
All of these PRs are based on different branches, and they often conflict. If you're going to pull any of them, I recomend pulling issue-69 and user-keys-master first, then letting me know which others you do (or don't) want to merge, and letting me resolve the conflicts. |
Thanks @xxxserxxx -- I will get the user-keys-master branch merged first I think. A useful change and helps @botto 's plight of separating the cli into a lib. @botto please take a look too. |
Rebased naggie/master onto this so it's a clean merge again. |
@xxxserxxx would you mind resolving the build issue here pls? Feel free to revert my bad merge. |
Yah, no problem. |
Man, I hate git. I created a new branch, |
This version (which can be merged on top of, or instead of, report_errors) replaces
ExitFail()
in the top-level functions, such that errors are passed up to the main function and reported there. Long-term,ExitFail()
would ideally be removed entirely; by exiting deep in the stack, it prevents calling functions the opportunity to handle and clean up after errors. However, this PR focuses on having consistent behavior in all of the top-level commands by usingRunE()
wherever there can be failures.