---
title: MTLCommandEncoderErrorState.affected
framework: metal
role: symbol
role_heading: Case
path: metal/mtlcommandencodererrorstate/affected
---

# MTLCommandEncoderErrorState.affected

An error state that indicates the GPU failed to fully execute the commands because of an error.

## Declaration

```swift
case affected
```

## Discussion

Discussion The commands in the command buffer may or may not be responsible for the error.

## See Also

### Getting the error state

- [MTLCommandEncoderErrorState.completed](metal/mtlcommandencodererrorstate/completed.md)
- [MTLCommandEncoderErrorState.pending](metal/mtlcommandencodererrorstate/pending.md)
- [MTLCommandEncoderErrorState.faulted](metal/mtlcommandencodererrorstate/faulted.md)
- [MTLCommandEncoderErrorState.unknown](metal/mtlcommandencodererrorstate/unknown.md)
