CFErrorCreate(_:_:_:_:)
Creates a new CFError object.
Declaration
func CFErrorCreate(_ allocator: CFAllocator!, _ domain: CFErrorDomain!, _ code: CFIndex, _ userInfo: CFDictionary!) -> CFError!Parameters
- allocator:
The allocator to use to allocate memory for the new object. Pass
NULLor Kcfallocatordefault to use the current default allocator. - domain:
A CFString that identifies the error domain. If this reference is
NULLor is otherwise not a valid CFString, the behavior is undefined. - code:
A CFIndex that identifies the error code. The code is interpreted within the context of the error domain.
- userInfo:
A CFDictionary created with Kcfcopystringdictionarykeycallbacks and Kcftypedictionaryvaluecallbacks. The dictionary is copied with Cfdictionarycreatecopy(_:_:). If you do not want the userInfo dictionary, you can pass
NULL, in which case an empty dictionary will be assigned.
Return Value
A new CFError object. Ownership follows the The Create Rule.