-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error handling #13
Comments
Yeah, I think this is reasonable. There are only so many ways that hex decoding could go wrong and these variants all contain plausibly useful information for users to match on. |
If #31 merges I believe we can close this. |
Yeah, it's good, I just want to wrap each variant in a struct. Especially |
The statement below assumes by this you mean "hide the internals", same as the reasoning for adding So I thought about the " |
If the intention is to release this ASAP as 0.x, then I'm fine. But for 1.0 I want the internals hidden. I specifically know what I want to add eventually (spans), so I see no reason to not protect the stability. However, I'm considering allowing in the future to be able to report both uneven length and wrong characters, which would imply hiding whole error and then having a method to get the first error (which is always available) and a method to iterate over the errors when |
Yes, for 1.0 we definite want to hide the errors properly and add as much extra information as we can. @tcharding I wouldn't mind doing some small things in order to get a quick release out, but I wonder if we actually need a quick release here? This crate is functionally complete and the remaining TODOs are API improvements for 1.0, so maybe we should just grind away on that and not bother releasing til we think we're close to done? |
Oh I wasn't pushing for another 0.x release, was just referring to the eventual 1.0 release - which I am pushing for :) |
Oh boy, I was just working on this and I realized that even wrapping the errors in structs does not save us from having to do a major version bump when we add information because doing so almost certainly changes the |
@tcharding I'm not convinced For spans I would absolutely not put them into |
Oh, that is a good point. Did not think of that. Cheers. |
Closing in favour of #42 |
Is it ok that
HexToBytesError
does not usenon_exhaustive
. I think it is but could I get a few more eyes on it please.The text was updated successfully, but these errors were encountered: