<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASEAssetError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:@E@PHASEAssetError"
  },
  "title" : "PHASEAssetError.Code"
}
-->

# PHASEAssetError.Code

Codes that identify framework asset errors.

```
enum Code
```

## Topics

### Errors

[`case alreadyExists`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/alreadyExists)

An error the asset registry throws when the app registers an asset twice by the same name.

[`case badParameters`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/badParameters)

An error that indicates an asset registry call contains invalid data.

[`case failedToLoad`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/failedToLoad)

An error that indicates an asset failed to load.

[`case generalError`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/generalError)

An error the asset registry throws when an unspecified problem occurs.

[`case invalidEngineInstance`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/invalidEngineInstance)

An error that indicates an asset registry call references an invalid engine.

[`case memoryAllocation`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/memoryAllocation)

An error the framework throws when an asset depletes system memory.

### Initializers

[`init?(rawValue: Int)`](/documentation/PHASE/PHASEAssetError-swift.struct/Code/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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