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

Error Type function errorWithCode should be public? #668

Closed
pbenkoe opened this issue Aug 10, 2015 · 5 comments
Closed

Error Type function errorWithCode should be public? #668

pbenkoe opened this issue Aug 10, 2015 · 5 comments

Comments

@pbenkoe
Copy link

pbenkoe commented Aug 10, 2015

When i try to use

let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason)

as suggested in the Readme i get 'Error.Type' does not have a member named 'errorWithCode'.
I am using Cocoapods.

@cnoon
Copy link
Member

cnoon commented Aug 10, 2015

Are you writing your own response serializer? Could you post some more logic? I'm trying to understand what you're trying to do to figure out whether we should open that method up or not.

@pbenkoe
Copy link
Author

pbenkoe commented Aug 10, 2015

yes, i'm writing my own response serializer. basically it's the exact same use case as suggested in the Readme...

@brandonlau
Copy link

I am running into this issue as well while following the example in the README to implement a generic collection serializer. Modifying the function signature of errorWithCode to be a public static func seems to resolve this, though preliminary investigations don't seem to suggest that the static method needs to be explicitly set as public.

@cnoon
Copy link
Member

cnoon commented Aug 11, 2015

Thanks for the explanation gents. That was oversight on my part. I've opened up both errorWithCode:failureReason: methods in 85b90fe. This should resolve your issues. 👍🏼

@cnoon cnoon closed this as completed Aug 11, 2015
@cnoon cnoon added this to the 2.0.0 milestone Aug 11, 2015
@pbenkoe
Copy link
Author

pbenkoe commented Aug 11, 2015

merci! :)

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

No branches or pull requests

3 participants