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

Use error type instead of using catch all failure::Error in Producer::con #8

Closed
wezm opened this issue Mar 18, 2018 · 3 comments · Fixed by #28
Closed

Use error type instead of using catch all failure::Error in Producer::con #8

wezm opened this issue Mar 18, 2018 · 3 comments · Fixed by #28

Comments

@wezm
Copy link
Contributor

wezm commented Mar 18, 2018

Per the failure guidance the failure::Error type is typically only recommended when prototyping or for "applications" that won't handle the error. It would be better to define a custom error type and 'derive Fail' for it.

I see there are some parts of the code using a custom error type but others are falling back on Error.

If this sounds reasonable I'm happy to make this change.

@wezm wezm changed the title Define error type instead of using catch all failure::Error Use error type instead of using catch all failure::Error in Producer::con Mar 18, 2018
@jonhoo
Copy link
Owner

jonhoo commented Mar 18, 2018

For the various methods on Producer, I completely agree that a custom error type would be useful. For Consumer::run* it's less clear that the user of the library can do anything useful on error, so I'm less concerned. Happy to take a look at a PR!

@jonhoo
Copy link
Owner

jonhoo commented Oct 22, 2018

@wezm still want to take a stab at this too? I'd be happy to review and merge!

@wezm
Copy link
Contributor Author

wezm commented Oct 24, 2018

I've moved away from using Faktory for my project so don't have a huge personal need to implement this or #9 (comment). However I do need a couple more PRs for Hacktoberfest so might see if I can implement this one.

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 a pull request may close this issue.

2 participants