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

Idiomatic Error Handling #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Quin-Darcy
Copy link

Hi! I really liked your project and had some fun today adding more structured error handling and input validation. Moved all the error related stuff to a new file called error.rs to make it easier to add to it. Didn't even touch arp.rs, but I will do that next and will also see about making this tool compatible with Windows.

Obviously you don't have to accept the pull request, but either way good work on this!

Quin-Darcy and others added 4 commits September 17, 2023 18:17
- Replace argparse library with clap
- Consolidate input validation into single method in Cli impl
- Refactor error handling by introducing CliError and NetUtilsError enums
- Implement Display trait for better error output
- Altered output formatting for to separate info from action
- Update function signatures to better reflect the types of errors they can return

Breaking Change:
- Update main function signature to return Result<(), NetUtilsError>
- Argument variable names

TODO:
- Add more error handling in arp.rs
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