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

Enum errors #79

Merged
merged 8 commits into from
Jul 9, 2016
Merged

Enum errors #79

merged 8 commits into from
Jul 9, 2016

Conversation

Anviking
Copy link
Owner

@Anviking Anviking commented Mar 8, 2016

  • Restore old DecodingError enum
  • Rename DecodingError.Info to DecodingError.Metadata
  • Fix tests also

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

Perhaps the protocol DecodingError should be an enum like before.

Reasons:

  • Error above
  • Enum-syntax definitelyperhaps feels more swifty
  • Have seen wrapped errors in a bunch of places and now feel more comfortable with them

One could also argue that non DecodingErrors errors shouldn't be wrapped, but just passed through, but have implemented wrapping here.

@Anviking
Copy link
Owner Author

Anviking commented Mar 8, 2016

Oops, this also includes #77. Eh, will rebase…

@Anviking Anviking mentioned this pull request Apr 28, 2016
2 tasks
public var path: [String]
public let object: AnyObject
public var rootObject: AnyObject?
case TypeMismatch(expected: Any.Type, actual: Any.Type, Metadata)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it

@Anviking Anviking modified the milestone: v1.0 Jul 9, 2016
@Anviking Anviking merged commit 88dd1da into master Jul 9, 2016
@Anviking Anviking deleted the enum-errors branch July 9, 2016 12:52
@Anviking Anviking mentioned this pull request Jul 10, 2016
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.

2 participants