# FilterException Constructor

> Initializes a new instance of the FilterException class.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 24.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > FilterException Constructor
- **629 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/filterexception/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/filterexception/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/filterexception/constructor/llms-full.txt

---

### Description

Initializes a new instance of the FilterException class.

### Syntax

#### FilterException(FilterException.FilterError)

Initializes a new instance of the FilterException class with a specified error.

```csharp
public FilterException(FilterException.FilterError error);
```

```vbnet
Public Sub New([error] As FilterException.FilterError)
```

| Parameter | Description |
|---|---|
| error | The error that is the cause of the current exception. |

#### FilterException(FilterException.FilterError, string)

Initializes a new instance of the FilterException class with a specified error and a specified error message.

```csharp
public FilterException(FilterException.FilterError error, string message);
```

```vbnet
Public Sub New([error] As FilterException.FilterError, message As String)
```

| Parameter | Description |
|---|---|
| error | The error that is the cause of the current exception. |
| message | The error message that explains the reason for the exception. |

### Examples

The following example creates a Filter Exception instance and configures its help link setting for a document workflow.

```csharp
FilterException filterException = new(FilterException.FilterError.WrongFileType);
filterException.HelpLink = "Quarterly report";
```

```vbnet
Dim filterException As New FilterException(FilterException.FilterError.WrongFileType)
filterException.HelpLink = "Quarterly report"
```

---

## Nearby

- **Previous:** [FilterException Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/filterexception/llms-full.txt)
- **Next:** [FilterException.FilterError Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/filterexception/filtererror-enumeration/llms-full.txt)
