Created
May 9, 2016 21:53
-
-
Save benjaminsnorris/5389055d19e96295f03dcec01e1f3209 to your computer and use it in GitHub Desktop.
Swift error with default description
This file contains hidden or 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
// From Tim Shadel | |
enum FakeError: String, ErrorType, CustomStringConvertible { | |
case LoginFailed | |
var description: String { | |
return "FakeError: \(self.rawValue)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment