# IDurableTaskCompletionSource&lt;T&gt;.TrySetException(Exception)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurabletaskcompletionsource-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurabletaskcompletionsource-1/methods/)

```csharp
public abstract bool TrySetException(Exception exception)
```

Attempts to transition the durable state to faulted with the specified exception.

### Parameters

- `exception` (`Exception`): The exception which faults the task.

### Returns

`true` if the state was transitioned; otherwise, `false`.
