# TrySetException(System.Exception)

Method in [YarnTaskCompletionSource\<T>](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.yarntaskcompletionsource-2)

## Summary

```csharp
public partial bool TrySetException(System.Exception exception);
```

## Parameters

| Name                  | Description |
| --------------------- | ----------- |
| `Exception` exception |             |
