AnyObject] /** Get typed value for the key - parameters: - key: JSON key - returns: Typed value */ func getValue<T>(key: String) throws -> T { guard let value = raw[key] else { throw JSONDecodeError.MissingRequiredKey(key) } ...
AnyObject] /** Get typed value for the key - parameters: - key: JSON key - returns: Typed value - throws: JSONDecodeError */ func getValue<T>(key: String) throws -> T { guard let value = raw[key] else { throw JSONDecodeError.MissingRequiredKey(key) } ...
or throw error • ErrorType should provide informations in detail • Documentation comment with possible error kind • Treating ErrorType as NSError have some problems