---
title: "CFErrorGetDomain(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cferrorgetdomain(_:)"
---

# CFErrorGetDomain(_:)

Returns the error domain for a given CFError.

## Declaration

```swift
func CFErrorGetDomain(_ err: CFError!) -> CFErrorDomain!
```

## Parameters

- `err`: The error to examine. If this is not a valid CFError, the behavior is undefined.

## Return Value

Return Value The error domain for err. Ownership follows the The Get Rule.

## See Also

### Getting Information About an Error

- [CFErrorGetCode(_:)](corefoundation/cferrorgetcode(_:).md)
- [CFErrorCopyUserInfo(_:)](corefoundation/cferrorcopyuserinfo(_:).md)
- [CFErrorCopyDescription(_:)](corefoundation/cferrorcopydescription(_:).md)
- [CFErrorCopyFailureReason(_:)](corefoundation/cferrorcopyfailurereason(_:).md)
- [CFErrorCopyRecoverySuggestion(_:)](corefoundation/cferrorcopyrecoverysuggestion(_:).md)
