error
A description of an error when the GPU encounters an issue as it runs the command buffer.
Declaration
var error: (any Error)? { get }Mentioned in
Discussion
You typically check this property during development to get more information about a runtime issue. The property remains nil unless the GPU can’t successfully run the command buffer.
An error’s userInfo dictionary property contains additional information if the command buffer’s errorOptions property includes encoderExecutionStatus. You can retrieve an MTLCommandBufferEncoderInfo instance from the dictionary by accessing it with MTLCommandBufferEncoderInfoErrorKey.