Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从 10.8 开始,GetMacOSStatusErrorString 和 GetMacOSStatusCommentString 函数似乎已被弃用。这些方便的调试功能是否有任何未弃用的替换功能?
您可以使用[NSError errorWithDomain:NSOSStatusErrorDomain code:errorCode userInfo:nil]来获取NSError代表OSStatus的errorCode。NSError提供从错误代码 ( ) 获取本地化错误消息的能力-localizedDescription,或用于调试目的的常规非本地化错误消息 ( -description)。
[NSError errorWithDomain:NSOSStatusErrorDomain code:errorCode userInfo:nil]
NSError
OSStatus
errorCode
-localizedDescription
-description