# Exception tracking
> Automatically track unhandled exceptions in native iOS and Android code with React Native tracker v2 exception autotracking.
> Source: https://docs.snowplow.io/docs/sources/react-native-tracker/previous-version/react-native-tracker-v2-reference/tracking-events/exception-tracking/
> Documentation index: https://docs.snowplow.io/llms.txt
> Status: Previous version
> Current version: https://docs.snowplow.io/docs/sources/react-native-tracker/

Exception tracking captures any unhandled exceptions within the application.

> **Info:** Exception auto-tracking only captures errors from the native iOS and Android code. JavaScript errors in your React Native code will not be captured currently.

The exception tracking is enabled by default. It can be set in `trackerConfig` like in the example below:

```typescript
const tracker = createTracker(
    'appTracker',
    {
      endpoint: COLLECTOR_URL,
    },
    {
        trackerConfig: {
            exceptionAutotracking: true, // only errors in native app code
        },
    }
);
```

It allows the tracker to intercept critical exceptions in the app. Exceptions can crash the app so it's likely that the event will be sent after the restart of the app. Being a critical situation we can't be 100% sure that all the exception stacktraces are reliably stored for sending before the crash of the app.
