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

Add CookieError for error handling #55

Merged
merged 2 commits into from
Sep 7, 2016
Merged

Conversation

spk
Copy link
Contributor

@spk spk commented Sep 3, 2016

see #1
Cheers

@alexcrichton
Copy link
Collaborator

Thanks for the PR! Could this actually be called ParseError as it's returned from Cookie::parse. Additionally could it be made into an opaque struct so it can be made extensible in the future as well?

@spk
Copy link
Contributor Author

spk commented Sep 6, 2016

Glad to help, there is also percent_decode that return std::str::Utf8Error
I don't know about "opaque struct" I will look it up, thanks

@alexcrichton
Copy link
Collaborator

Oh sorry by "opaque struct" I mean something like:

pub struct Error {
    // ... private internals
}

vs

pub enum Error {
    // public variants
}

The difference is that with a public enum adding a variant is a breaking change, but with an opaque struct adding fields is not an API-breaking-change.

@spk
Copy link
Contributor Author

spk commented Sep 7, 2016

Thanks for the explanation ! I've made some changes in 3dcbde5

@alexcrichton
Copy link
Collaborator

Thanks!

@alexcrichton alexcrichton merged commit b90afea into rwf2:master Sep 7, 2016
@spk spk deleted the cookie-error branch October 1, 2016 09:43
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.

None yet

2 participants