Closed collinhundley closed 8 years ago
I just realized I forgot to update the tests to reflect the changes. I'll have to do it tomorrow when I get a chance.
Also, it looks like auth()
needs to be updated as well. I'm starting to wonder about this form of error handling throughout the package... I haven't dug too deep into it but I suspect that it's present in other places too. Can somebody explain to me why this form of error handling was chosen? It doesn't seem very Swifty at all.
Description
The
Redis.connect()
method currently accepts a completion handler with an optionalNSError
indicating the status of the connection. This pull request removes the completion handler entirely, and instead allows theconnect()
method tothrow
. It may now be used as such:Motivation and Context
Requiring a completion handler suggests to the user that the
connect()
method is an asynchronous operation, which it is not. In addition, the use of optionalNSError
s is reminiscent of Swift 1.x error handling and has generally been replaced bythrow
.Checklist: