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

Conversation

Projects
None yet
2 participants
@spk
Contributor

spk commented Sep 3, 2016

see #1
Cheers

@alexcrichton

This comment has been minimized.

Owner

alexcrichton commented Sep 6, 2016

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 spk force-pushed the spk:cookie-error branch from 4e6685e to c42e3f5 Sep 6, 2016

@spk

This comment has been minimized.

Contributor

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

This comment has been minimized.

Owner

alexcrichton commented Sep 7, 2016

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

This comment has been minimized.

Contributor

spk commented Sep 7, 2016

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

@alexcrichton

This comment has been minimized.

Owner

alexcrichton commented Sep 7, 2016

Thanks!

@alexcrichton alexcrichton merged commit b90afea into alexcrichton:master Sep 7, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@spk spk deleted the spk:cookie-error branch Oct 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment