---
name: "al_register_assert_handler"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_register_assert_handler"
---

# al\_register\_assert\_handler(3)

Allegro 5 API

## NAME

al\_register\_assert\_handler - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_register_assert_handler(void (*handler)(char const *expr,
     char const *file, int line, char const *func))
  ```

## DESCRIPTION

Register a function to be called when an internal Allegro assertion fails. Pass NULL to reset to the default behaviour, which is to do whatever the standard `assert()` macro does.

## SINCE

5\.0.6, 5.1.0
