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

Error matchers #58

Merged
merged 2 commits into from
Mar 13, 2019
Merged

Error matchers #58

merged 2 commits into from
Mar 13, 2019

Conversation

khanlou
Copy link
Owner

@khanlou khanlou commented Feb 26, 2019

This pull request adds the ability to "match" a specific type of error, and have the error you handle be casted to that type. I'm going to do the same thing with the PR as the last PR — leave it open for a week or two to see if anyone has any feedback. This PR is additive so this will go into the 2.1 release.

Wanted to thank @elenipapanik and @kremizask, the idea is pulled from their https://github.com/Workable/swift-error-handler.

One thing I'd be open to is adding an ifNoMatch parameter with an enum value of either .ignore or .crash where .ignore is the default.

@khanlou khanlou merged commit 5fe08d8 into master Mar 13, 2019
@khanlou khanlou deleted the error-matchers branch March 13, 2019 22:37
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