---
title: "Ignoring Exceptions"
description: "Learn how to ignore exceptions by their type when initializing the SDK."
url: https://docs.sentry.io/platforms/dotnet/guides/xamarin/ignoring-exceptions/
---

# Ignoring Exceptions | Sentry for Xamarin

You can ignore exceptions by their type when initializing the SDK:

```csharp
// Add this to the SDK initialization callback
options.AddExceptionFilterForType<OperationCanceledException>();
```

It works in the whole inheritance chain. The example above will also filter out `TaskCanceledException` because it derives from `OperationCanceledException`.
