# AddAndThrowException Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.addandthrowexception/)

## AddAndThrowException {#constructor-16df968f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.addandthrowexception/constructors/constructor-16df968f/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions.TestKit.Base/Grains/MultiStateTransactionalGrain.cs#L181)

```csharp
public AddAndThrowException()
```

## AddAndThrowException(string) {#constructor-string-76abc61d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.addandthrowexception/constructors/constructor-string-76abc61d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions.TestKit.Base/Grains/MultiStateTransactionalGrain.cs#L183)

```csharp
public AddAndThrowException(string message)
```

### Parameters

- `message` (`string`)

## AddAndThrowException(string, Exception) {#constructor-string-system-exception-e11d1557}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.addandthrowexception/constructors/constructor-string-system-exception-e11d1557/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions.TestKit.Base/Grains/MultiStateTransactionalGrain.cs#L185)

```csharp
public AddAndThrowException(string message, Exception innerException)
```

### Parameters

- `message` (`string`)
- `innerException` (`Exception`)
