---
title: "program(_:handleError:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnprogramdelegate/program(_:handleerror:)"
---

# program(_:handleError:)

Tells the delegate that an error occurred when compiling GLSL source code.

## Declaration

```swift
optional func program(_ program: SCNProgram, handleError error: any Error)
```

## Parameters

- `program`: The program that generated the compilation error.
- `error`: The compilation error that was raised.

## Discussion

Discussion Examine the error parameter for details of the compilation error provided by the GLSL compiler.

## See Also

### Handling Shader Compilation Errors

- [SCNErrorDomain](scenekit/scnerrordomain.md)
- [SceneKit Error Codes](scenekit/1409723-scenekit-error-codes.md)
