Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Better error handling when accessing network interface #73
Right now this function:
Uses std::io::Error, probably not as it was intended, in order to differentiate between a permission error, a general network error and an unknown interface type (one that
It would be nice if we had our own error type for this, that would allow us to have the same functionality we have now (alerting the user that they need more permissions, recommending they run with sudo, or indicating that it could not find any interfaces to listen on).
This pattern might be a good option, though I'm not 100% sure it will fit in this case: https://rust-lang-nursery.github.io/failure/error-errorkind.html