“错误”类型的值没有成员“代码” [英] Value of type 'Error' has no member 'code'
问题描述
我正在将测试应用程序移动到Xcode 8 Beta 5并将我的代码转换为Swift 3.关于从<转换到错误
,我留下了一些错误code> NSError 。我在Xcode中收到错误,'类型的值'错误'没有成员'代码'
。我仍然可以使用 localizedDescription
。 代码
不再是错误
中的值,还是仅仅是Xcode中的错误?
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?
推荐答案
稍后在我自己的会议记录中找出答案。 Xcode决定给我一个你的意思是
建议和 .code
现在是 ._ code
。
Figured the answer out on my own minutes later. Xcode decided to give me a did you mean
suggestion and .code
is now ._code
.
这篇关于“错误”类型的值没有成员“代码”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!