<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/CustomNSError",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation13CustomNSErrorP"
  },
  "title" : "CustomNSError"
}
-->

# CustomNSError

A specialized error that provides a domain, error code, and user-info dictionary.

```
protocol CustomNSError : Error
```

## Relationships

### Conforming Types

[`CocoaError`](/documentation/Foundation/CocoaError)

[`URLError`](/documentation/Foundation/URLError)

[`POSIXError`](/documentation/Foundation/POSIXError)

[`MachError`](/documentation/Foundation/MachError)

### Inherits From

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Error`](/documentation/Swift/Error)

[`Sendable`](/documentation/Swift/Sendable)

---

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)