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

more error handling #53

Closed
extrawurst opened this issue May 13, 2020 · 7 comments
Closed

more error handling #53

extrawurst opened this issue May 13, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@extrawurst
Copy link
Collaborator

I started asyncgit crate ignoring errors unwrap is all over the place but the goal would be to handle them correctly like with sync::get_commits_info

@extrawurst extrawurst added enhancement New feature or request good first issue Good for newcomers labels May 13, 2020
@MCord
Copy link
Contributor

MCord commented May 13, 2020

Hi, I would love to help but I don't have much experience in Rust. Can I take this issue ?

@extrawurst
Copy link
Collaborator Author

Hy @MCord thanks for your interest in helping❤️! Absolutely you can grab this one - let me know when you need any input!

@MCord
Copy link
Contributor

MCord commented May 14, 2020

So here is my first question: do we want to define a custom error for asyncgit lib or use the git2::Error ? in many cases the underlying error is git2::Error but for example in hook::hooks_commit_msg() it might be an std::io::Error or if for whatever reason we can not get a temp file name we have to return some kind of error, which type would that be ?

@extrawurst
Copy link
Collaborator Author

Good question. I was expecting to have to come up with a lib specific Error using thiserror and wrapping git2::Error,... in it to have the most flexibility. what do you think?

@MCord
Copy link
Contributor

MCord commented May 14, 2020

Ok, let's try that. I will send a PR so we can discuss the implementation.

@extrawurst
Copy link
Collaborator Author

Really cool! Thank you❤️!

@MCord
Copy link
Contributor

MCord commented May 14, 2020

I have created a pull request #58. I will continue when you give me some feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants