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

Throw other errors within init(attempt:) and tryMap #254

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

philtre
Copy link

@philtre philtre commented Nov 9, 2017

When using Result in my project, I needed to use init(attempt:) in several places but I wanted to use my own wrapper for arbitrary Errors. The existing initializer only works with AnyError, so I've modified the code to allow using any Error which conforms to the ErrorInitializing protocol.

@philtre
Copy link
Author

philtre commented Nov 10, 2017

Noticed that some tests were failing. Those errors are now fixed and I added a few more tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant