# ResponseCompletionSource.SetException(Exception)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.responsecompletionsource/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.responsecompletionsource/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/ResponseCompletionSource.cs#L49)

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

Completes this instance with an exception.

### Parameters

- `exception` (`Exception`): The exception.
