---
name: "SDL_AssertionHandler"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_AssertionHandler"
---

# SDL\_AssertionHandler(3type)

A callback that fires when an SDL assertion fails.

## NAME

SDL\_AssertionHandler - A callback that fires when an SDL assertion fails.

## HEADER FILE

Defined in SDL3/SDL\_assert.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef SDL\_AssertState (SDLCALL \*SDL\_AssertionHandler)( const SDL\_AssertData \*data, void \*userdata);**

## FUNCTION PARAMETERS

- *data*

  a pointer to the  **SDL\_AssertData**\
    structure corresponding to the current assertion.

- *userdata*

  what was passed as **userdata** to  **SDL\_SetAssertionHandler** ().

## RETURN VALUE

Returns an  **SDL\_AssertState**\
  value indicating how to handle the failure.

## THREAD SAFETY

This callback may be called from any thread that triggers an assert at any time.

## AVAILABILITY

This datatype is available since SDL 3.2.0.
