Error Dictionary Keys

Networking-related keys that may be available in a CFErrorRef object’s userInfo dictionary.

Overview

Many network functions return CFErrorRef objects. When the error object's domain is kCFErrorDomainCFNetwork, you can query the object for additional information.

For example:

if (CFEqual(CFErrorGetDomain(err), kCFErrorDomainCFNetwork) && CFErrorGetCode(err) == kCFHostErrorUnknown) {
 
    CFDictionaryRef userInfo = CFErrorCopyUserInfo(err);
 
    CFNumberRef number = (CFNumberRef) CFDictionaryGetValue(userInfo, kCFGetAddrInfoFailureKey);
 
    ...
 
    CFRelease(userInfo);
}

Topics

See Also

Errors

CFNetworkErrors

This enumeration contains error codes returned under the error domain kCFErrorDomainCFNetwork.

Error Domains

High-level error domains.