<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.4.0 -",
    "tvOS: 26.4.0 -",
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDeviceError-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:SC14MTLDeviceErrorLeV"
  },
  "title" : "MTLDeviceError"
}
-->

# MTLDeviceError

```
struct MTLDeviceError
```

## Topics

### Type Properties

[`static var errorDomain: String`](/documentation/Metal/MTLDeviceError-swift.struct/errorDomain)

[`static var none: MTLDeviceError.Code`](/documentation/Metal/MTLDeviceError-swift.struct/none)

[`static var notSupported: MTLDeviceError.Code`](/documentation/Metal/MTLDeviceError-swift.struct/notSupported)

### Enumerations

[`enum Code`](/documentation/Metal/MTLDeviceError-swift.struct/Code)

Enumeration of kinds of errors that methods on MTLDevice can produce.

## Relationships

### Conforms To

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

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

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

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

[`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)