---
title: MTLCommandBufferError
framework: metal
role: symbol
role_heading: Structure
path: metal/mtlcommandbuffererror-swift.struct
---

# MTLCommandBufferError

The command buffer error codes that indicate why the GPU doesn’t finish executing a command buffer.

## Declaration

```swift
struct MTLCommandBufferError
```

## Topics

### Errors codes

- [none](metal/mtlcommandbuffererror-swift.struct/none.md)
- [timeout](metal/mtlcommandbuffererror-swift.struct/timeout.md)
- [pageFault](metal/mtlcommandbuffererror-swift.struct/pagefault.md)
- [notPermitted](metal/mtlcommandbuffererror-swift.struct/notpermitted.md)
- [outOfMemory](metal/mtlcommandbuffererror-swift.struct/outofmemory.md)
- [invalidResource](metal/mtlcommandbuffererror-swift.struct/invalidresource.md)
- [memoryless](metal/mtlcommandbuffererror-swift.struct/memoryless.md)
- [deviceRemoved](metal/mtlcommandbuffererror-swift.struct/deviceremoved.md)
- [stackOverflow](metal/mtlcommandbuffererror-swift.struct/stackoverflow.md)
- [accessRevoked](metal/mtlcommandbuffererror-swift.struct/accessrevoked.md)
- [internal](metal/mtlcommandbuffererror-swift.struct/internal.md)
- [MTLCommandBufferError.Code](metal/mtlcommandbuffererror-swift.struct/code.md)

### Error domain

- [errorDomain](metal/mtlcommandbuffererror-swift.struct/errordomain.md)
- [MTLCommandBufferErrorDomain](metal/mtlcommandbuffererrordomain.md)

### Deprecated

- [blacklisted](metal/mtlcommandbuffererror-swift.struct/blacklisted.md)

## Relationships

### Conforms To

- [CustomNSError](foundation/customnserror.md)
- [Equatable](swift/equatable.md)
- [Error](swift/error.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Submitting work to a GPU with Metal

- [Setting up a command structure](metal/setting-up-a-command-structure.md)
- [MTLCommandQueue](metal/mtlcommandqueue.md)
- [MTLCommandQueueDescriptor](metal/mtlcommandqueuedescriptor.md)
- [MTLCommandBuffer](metal/mtlcommandbuffer.md)
- [MTLCommandBufferDescriptor](metal/mtlcommandbufferdescriptor.md)
- [MTLCommandEncoder](metal/mtlcommandencoder.md)
