An overview about Swift 2's new built-in error handling, an exploration how it works and how it can be tested, and a quick comparison with the approach of a Result type.
UnexpectedEOS case IllegalNumberFormat(numberString: String) case IllegalEscapeSequence(escapeSequence: String) case NonTerminatedList case NonTerminatedQuotedString case IllegalHexCharacter(char: Character) }
7b5, // but let you avoid to write underscores. var code: Int var domain: String var _code: Int { return code } var _domain: String { return domain } }
catch blocks. · Catch Foundation errors by pattern matches with NSCocoaError constructors · File a Radar if the error is not exposed / there is no obvious adequate