Skip to content

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

Open
philtre wants to merge 12 commits into
antitypical:masterfrom
adamsinger:attempt-with-other-errors
Open

Throw other errors within init(attempt:) and tryMap#254
philtre wants to merge 12 commits into
antitypical:masterfrom
adamsinger:attempt-with-other-errors

Conversation

@philtre

@philtre philtre commented Nov 9, 2017

Copy link
Copy Markdown

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

philtre commented Nov 10, 2017

Copy link
Copy Markdown
Author

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