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

# MTLIOError

The categories of errors for creating an input/output file handle.

```
struct MTLIOError
```

## Topics

### Error codes

[`urlInvalid`](/documentation/Metal/MTLIOError-swift.struct/urlInvalid)

An error that represents a problem with a file URL.

[`internal`](/documentation/Metal/MTLIOError-swift.struct/internal)

An error that represents a problem internal to the Metal framework.

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

The error codes for creating an input/output file handle.

### Error domain

[`errorDomain`](/documentation/Metal/MTLIOError-swift.struct/errorDomain)

The current error domain for input/output command queues.

[`MTLIOErrorDomain`](/documentation/Metal/MTLIOErrorDomain)

The domain for input/output command queue errors.



---

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)
