---
title: "NutrientException"
canonical_url: "https://www.nutrient.io/api/csharp/exceptions/nutrient-exception/"
md_url: "https://www.nutrient.io/api/csharp/exceptions/nutrient-exception.md"
last_updated: "2026-10-08T08:55:57.713Z"
description: "The exception reported by the Nutrient .NET SDK when a native operation fails."
---

`NutrientException` is the error type used by the Nutrient.NET SDK for failed native operations. It derives from `System.Exception`.

```csharp

using Nutrient;

try
{
    using Document document = Document.Open("input.pdf");
}
catch (NutrientException error)
{
    Console.WriteLine($"{error.Code}: {error.Message}");
}

```

## Properties

| Property    | Type     | Description                        |
| ----------- | -------- | ---------------------------------- |
| `Code`      | `int`    | Native error code.                 |
| `ErrorType` | `string` | Name of the native error type.     |
| `Message`   | `string` | Error message, including the code. |

---

## Related pages

- [Exceptions](/api/csharp/exceptions.md)

