pub unsafe extern "C-unwind" fn CFErrorCreate(
allocator: Option<&CFAllocator>,
domain: Option<&CFErrorDomain>,
code: CFIndex,
user_info: Option<&CFDictionary>,
) -> Option<CFRetained<CFError>>
CFBase
and CFDictionary
and CFError
only.Expand description
Creates a new CFError.
Parameter allocator
: The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the
current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Parameter domain
: A CFString identifying the error domain. If this reference is NULL or is otherwise not a valid CFString, the behavior is undefined.
Parameter code
: A CFIndex identifying the error code. The code is interpreted within the context of the error domain.
Parameter userInfo
: A CFDictionary created with kCFCopyStringDictionaryKeyCallBacks and kCFTypeDictionaryValueCallBacks. It will be copied with CFDictionaryCreateCopy().
If no userInfo dictionary is desired, NULL may be passed in as a convenience, in which case an empty userInfo dictionary will be assigned.
Returns: A reference to the new CFError.