Last active
April 11, 2018 04:10
-
-
Save anirudhamahale/a5a3a1aea5aecf9425209d1fdd7bb680 to your computer and use it in GitHub Desktop.
An extension of Error generic from Swift
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
| extension Error { | |
| var code: Int { return (self as NSError).code } | |
| var domain: String { return (self as NSError).domain } | |
| var userInfo: [String : Any] { return (self as NSError).userInfo } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment