---
title: MTLCommandBufferStatus.error
framework: metal
role: symbol
role_heading: Case
path: metal/mtlcommandbufferstatus/error
---

# MTLCommandBufferStatus.error

A command buffer’s unsuccessful, final state, which indicates the GPU stopped running the buffer’s commands because of a runtime issue.

## Declaration

```swift
case error
```

## Mentioned in

Preparing your Metal app to run in the background

## Discussion

Discussion See the MTLCommandBuffer protocol’s status property for more information. When a command buffer’s status is equal to MTLCommandBufferStatus.error, check its error property for more details about the issue. See Command buffer debugging for more methods properties that can help you identify the issue.

## See Also

### Command buffer states

- [MTLCommandBufferStatus.notEnqueued](metal/mtlcommandbufferstatus/notenqueued.md)
- [MTLCommandBufferStatus.enqueued](metal/mtlcommandbufferstatus/enqueued.md)
- [MTLCommandBufferStatus.committed](metal/mtlcommandbufferstatus/committed.md)
- [MTLCommandBufferStatus.scheduled](metal/mtlcommandbufferstatus/scheduled.md)
- [MTLCommandBufferStatus.completed](metal/mtlcommandbufferstatus/completed.md)
