# TesseractOcrException class

> Tesseract could not read an image: it failed, or what it wrote cannot be used.

Namespace: [PdfNetStack.Ocr.Tesseract](https://www.jadev-corp.com/api/pdfnetstack-ocr-tesseract/)  
Assembly: PdfNetStack.Ocr.Tesseract.dll  
Package: `PdfNetStack`

Tesseract could not read an image: it failed, or what it wrote cannot be used.

```csharp
public sealed class TesseractOcrException : Exception, ISerializable
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[Exception](https://learn.microsoft.com/dotnet/api/system.exception) ← 
[TesseractOcrException](https://www.jadev-corp.com/api/pdfnetstack-ocr-tesseract/tesseractocrexception/)

**Implements**

[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable)

## Constructors

### <a id="PdfNetStack_Ocr_Tesseract_TesseractOcrException__ctor"></a> TesseractOcrException\(\)

Creates the exception.

```csharp
public TesseractOcrException()
```

### <a id="PdfNetStack_Ocr_Tesseract_TesseractOcrException__ctor_System_String_"></a> TesseractOcrException\(string\)

Creates the exception.

```csharp
public TesseractOcrException(string message)
```

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

What happened.

### <a id="PdfNetStack_Ocr_Tesseract_TesseractOcrException__ctor_System_String_System_Exception_"></a> TesseractOcrException\(string, Exception\)

Creates the exception.

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

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

What happened.

`innerException` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

The cause.

## Used in

- [Make scanned PDFs searchable with OCR in C#](https://www.jadev-corp.com/guides/ocr/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-ocr-tesseract/tesseractocrexception/
