You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now most of our API endpoint methods (these located in XcodeServerextensions) are constructed in non-swifty way - they return optional NSError pointers.
How about gradually changing them to throwing methods?
There are some benefits of doing this:
Swifty way (most important argument... 😜)
Reduce amount of Optionals
More descriptive errors, as they'll be enums
I know, I know, I may be overreacting... Maybe that's because I have too much free time? 😝
The text was updated successfully, but these errors were encountered:
Can you provide an example? AFAIK, all our APIs are asynchronous, so the callback block is called much later after the call of the API method. Throw only works with synchronous calls.
What we could do is change the signature from NSError to ErrorType. That would be a good improvement, because it would allow for error enum types.
Right now most of our API endpoint methods (these located in
XcodeServer
extension
s) are constructed in non-swifty way - they return optionalNSError
pointers.How about gradually changing them to
throw
ing methods?There are some benefits of doing this:
Optional
senum
sI know, I know, I may be overreacting... Maybe that's because I have too much free time? 😝
The text was updated successfully, but these errors were encountered: