Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacements for GetMacOSStatusErrorString/GetMacOSStatusCommentString

Tags:

macos

cocoa

The functions GetMacOSStatusErrorString and GetMacOSStatusCommentString appear to have been deprecated as of 10.8. Are there any non-deprecated replacement functions for these handy debugging functions?

like image 720
iain Avatar asked Feb 05 '13 03:02

iain


1 Answers

You can use [NSError errorWithDomain:NSOSStatusErrorDomain code:errorCode userInfo:nil] to get an NSError representing the OSStatus of errorCode. NSError provides the ability to get a localized error message from the error code (-localizedDescription), or a regular unlocalized one for debugging purposes (-description).

like image 59
bdash Avatar answered Oct 03 '22 01:10

bdash