OSStatus NSOSStatusErrorDomain [英] OSStatus NSOSStatusErrorDomain

查看:151
本文介绍了OSStatus NSOSStatusErrorDomain的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用

AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareSampleRate,&size,
                                      &myAudioDescription.mSampleRate)

上述声明产生的错误是

Error Domain=NSOSStatusErrorDomain Code=560557673 "The operation couldn’t be completed. (OSStatus error 560557673.)"

现在,560557673的含义是什么?我在哪里可以找到它的解释?

Now, here what does 560557673 mean and where can I find its explanation?

仅提供文档NSOSStatusErrorDomain是其中一个错误。

Documentation only provides NSOSStatusErrorDomain as one of the errors.

推荐答案

该代码表示​​属性数据大小不正确。

That code means the property data size was not correct.

OSStatus 是OS X和iOS中常用于错误代码的类型。如果代码的大小小于1百万,那么代码可能在CarbonCore框架的MacErrors.h中列出。否则,它可能是与返回它的函数在同一标题中列出的四字符代码。您可以通过在Xcode中单击它来找到函数的标题。代码很可能列在顶部附近,组合在一起。要将数字转换为代码,请使用Developer视图中的Calculator应用程序将其转换为十六进制,并将每个字节转换为字符。

OSStatus is a type commonly used for error codes in OS X and iOS. If the magnitude of the code is less than 1 million, then the code is probably listed in MacErrors.h in the CarbonCore framework. Otherwise, it is probably a four-character code listed in the same header as the function which returned it. You can find the header of a function by command-clicking it in Xcode. The codes will most likely be listed near the top, grouped together. To convert the number to a code, use the Calculator app in Developer view to convert it to hexadecimal and convert each byte to a character.

这篇关于OSStatus NSOSStatusErrorDomain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆