# SetException(Exception)

> Raise completion with an exception.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void SetException(Exception exception)
```

### Parameters

**** (\[Exception]\(https\://learn.microsoft.com/dotnet/api/system.exception)): Exception to raise in the continuation.
