-
Notifications
You must be signed in to change notification settings - Fork 73
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
Enum errors #79
Merged
Merged
Enum errors #79
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, this also includes #77. Eh, will rebase… |
public var path: [String] | ||
public let object: AnyObject | ||
public var rootObject: AnyObject? | ||
case TypeMismatch(expected: Any.Type, actual: Any.Type, Metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DecodingError
enumDecodingError.Info
toDecodingError.Metadata
Context: #60, #65
Was trying to use Decodable with a Result type and came across this error:
![skarmavbild 2016-03-08 kl 00 47 18](https://cloud.githubusercontent.com/assets/304423/13590058/2d225ad4-e4dd-11e5-9700-0ca06e312435.png)
Perhaps the protocol
DecodingError
should be an enum like before.Reasons:
definitelyperhaps feels more swiftyOne could also argue that non
DecodingErrors
errors shouldn't be wrapped, but just passed through, but have implemented wrapping here.