---
title: "xpc_rich_error_copy_description(_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_rich_error_copy_description(_:)"
---

# xpc_rich_error_copy_description(_:)

Copies the string description of an error.

## Declaration

```swift
func xpc_rich_error_copy_description(_ error: xpc_rich_error_t) -> UnsafeMutablePointer<CChar>?
```

## Parameters

- `error`: An error object that describes a failure.

## Return Value

Return Value The underlying string that describes the error, or nil if generating an a description fails.

## See Also

### Sending messages

- [xpc_rich_error_t](xpc/xpc_rich_error_t.md)
- [xpc_rich_error_can_retry(_:)](xpc/xpc_rich_error_can_retry(_:).md)
- [xpc_session_send_message(_:_:)](xpc/xpc_session_send_message(_:_:).md)
- [xpc_session_send_message_with_reply_async(_:_:_:)](xpc/xpc_session_send_message_with_reply_async(_:_:_:).md)
- [xpc_session_reply_handler_t](xpc/xpc_session_reply_handler_t-2hf7c.md)
- [xpc_session_send_message_with_reply_sync(_:_:_:)](xpc/xpc_session_send_message_with_reply_sync(_:_:_:).md)
