Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of type 'Error' has no member 'code' [duplicate]

I am moving a test application over to Xcode 8 Beta 5 and converted my code to Swift 3. I am left with a few errors regarding the switch to Error from NSError. I get an error in Xcode saying, 'Value of type 'Error' has no member 'code'. I can still use localizedDescription. Is code no longer a value within Error or is it just a bug within Xcode?

like image 248
Dan Levy Avatar asked Aug 12 '16 01:08

Dan Levy


1 Answers

Figured the answer out on my own minutes later. Xcode decided to give me a did you mean suggestion and .code is now ._code.

like image 136
Dan Levy Avatar answered Nov 01 '22 23:11

Dan Levy