# DurableTaskAbortedException Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskabortedexception/)

## DurableTaskAbortedException {#constructor-9a800bd1}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskabortedexception/constructors/constructor-9a800bd1/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTaskAbortedException.cs#L12-L14)

```csharp
public DurableTaskAbortedException()
```

Initializes an exception for a task aborted without a stated reason.

## DurableTaskAbortedException(string) {#constructor-string-701fd2ac}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskabortedexception/constructors/constructor-string-701fd2ac/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTaskAbortedException.cs#L18-L20)

```csharp
public DurableTaskAbortedException(string reason)
```

Initializes an exception for a task aborted for `reason`.

### Parameters

- `reason` (`string`): The reason the task was aborted, which becomes the exception message.

## DurableTaskAbortedException(string, Exception?) {#constructor-string-system-exception-nullable-813710b3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskabortedexception/constructors/constructor-string-system-exception-nullable-813710b3/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTaskAbortedException.cs#L25-L27)

```csharp
public DurableTaskAbortedException(string reason, Exception? innerException)
```

Initializes an exception for a task aborted for `reason`.

### Parameters

- `reason` (`string`): The reason the task was aborted, which becomes the exception message.
- `innerException` (`Exception?`): The exception which caused the abort.
