<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_rich_error_copy_description(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@F@xpc_rich_error_copy_description"
  },
  "title" : "xpc_rich_error_copy_description(_:)"
}
-->

# xpc_rich_error_copy_description(_:)

Copies the string description of an error.

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

## Parameters

`error`

An error object that describes a failure.

## Return Value

The underlying string that describes the error, or <doc://com.apple.documentation/documentation/ObjectiveC/nil-227m0> if generating an a description fails.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)