[swift-users] Proper Way to make Errors in Swift 3

2016-09-29 Thread Ronak via swift-users
Hello all, We are proceeding to update all of our Swift code to Swift 3 now and had a few questions about the proper way to implement Errors. We need these entities to be available in Objective-C and they are actively being used in Swift classes marked as @objc. I read: https://github.com/app

Re: [swift-users] Proper Way to make Errors in Swift 3

2016-09-29 Thread Ronak via swift-users
ope this is closer to the correct way to implement this. Thanks! Ronak > On Sep 29, 2016, at 1:17 PM, Ronak via swift-users > wrote: > > Hello all, > > We are proceeding to update all of our Swift code to Swift 3 now and had a > few questions about the proper way to impl

Re: [swift-users] Proper Way to make Errors in Swift 3

2016-09-29 Thread Ronak via swift-users
return __MyErrorCode.two.rawValue > case .three: > return __MyErrorCode.three.rawValue > } > } > > var errorUserInfo: [String: Any] { > var userInfo = [String: Any]() > if case let .one(string) = self { > u

Re: [swift-users] Proper Way to make Errors in Swift 3

2017-03-02 Thread Ronak via swift-users
else if case let .three(info) = self { userInfo = info } return userInfo } } Thanks Ronak > On Sep 29, 2016, at 5:46 PM, Ronak via swift-users > wrote: > > Ahh..thanks for the reply Zach. I didn’t actually see your reply until now. > > I’ll see how I can adjus

Re: [swift-users] Proper Way to make Errors in Swift 3

2017-03-06 Thread Ronak via swift-users
ann wrote: > > Have you tried explicitly casting the value to NSError when you pass it to > Objective-C? I think it should work then. > >let myError: MyError = ... >myObjCFunc(myError as NSError) > > On 02/03/2017 17:29, Ronak via swift-users wrote: >> Hi e