Skip to content

Closes: #25 - manually implement errors #26

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

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

chris-ricketts
Copy link
Contributor

Wraps ioctl macros with another macro that maps the ioctl call to a particular IoctlType. That type and the underlying nix::Error are then stored in the ErrorKind::Ioctl variant.

Plays nicely with the anyhow error handling crate, which seems like a more mature version of failure. This can be seen in the monitor example.

@posborne
Copy link
Member

Overall, changes look very good to me. We'll need to bump the semver version with these changes but that can be addressed separately. Thank you very much for these changes and apologies for the delays in review!

@posborne
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Nov 25, 2019
26: Closes: #25 - manually implement errors r=posborne a=chris-ricketts

Wraps ioctl macros with another macro that maps the ioctl call to a particular `IoctlType`. That type and the underlying `nix::Error` are then stored in the `ErrorKind::Ioctl` variant. 

Plays nicely with the [anyhow](https://github.com/dtolnay/anyhow) error handling crate, which seems like a more mature version of `failure`. This can be seen in the [monitor example](https://github.com/chris-ricketts/gpio-cdev/blob/6179eea9d16025a9236a0d961ce932b8517fbda9/examples/monitor.rs#L30).

Co-authored-by: chris ricketts <[email protected]>
@bors
Copy link
Contributor

bors bot commented Nov 25, 2019

Build succeeded

@bors bors bot merged commit 6179eea into rust-embedded:master Nov 25, 2019
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.

2 participants