<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalKit",
  "identifier" : "/documentation/MetalKit/MTKTextureLoader/Error",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MetalKit"
    ],
    "preciseIdentifier" : "c:@T@MTKTextureLoaderError"
  },
  "title" : "MTKTextureLoader.Error"
}
-->

# MTKTextureLoader.Error

Errors returned by the texture loader.

```
struct Error
```

## Topics

### Initializers

[`init(rawValue:)`](/documentation/MetalKit/MTKTextureLoader/Error/init(rawValue:))

### Keys

[`domain`](/documentation/MetalKit/MTKTextureLoader/Error/domain)

The error domain used by `MetalKit` when returning texture loading errors.

[`key`](/documentation/MetalKit/MTKTextureLoader/Error/key)

The key used to retrieve an error string from an error object’s <doc://com.apple.documentation/documentation/Foundation/NSError/userInfo> dictionary.



---

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)