Skip to content
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

add a result type #98

Merged
merged 3 commits into from
Sep 25, 2015
Merged

add a result type #98

merged 3 commits into from
Sep 25, 2015

Conversation

martindemello
Copy link
Contributor

A very simple implementation of a result type that wraps and returns exceptions from Message and Shell rather than reraising them. Tested manually by introducing errors to the example/* files and making sure the vroom output didn't change.

I believe this fixes all instances of reraising other than in the main Run loop.

"""

@classmethod
def Result(cls, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just have a result.Success or something semantic like that? AFAICT you never actually read the True values and True is just a placeholder.

@dbarnett
Copy link
Contributor

LGTM apart from one comment on the Result(True) idiom.

@martindemello
Copy link
Contributor Author

Added. Starts fixing #74

@dbarnett
Copy link
Contributor

LGTM.

dbarnett added a commit that referenced this pull request Sep 25, 2015
@dbarnett dbarnett merged commit 559d095 into google:master Sep 25, 2015
dbarnett added a commit that referenced this pull request May 22, 2018
Changes since 0.12.0:
  * Update to work with neovim python client 0.1.6 and newer (#104)
  * Improve error handling with a "result" type (#98)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants