---
name: "iv_fatal"
section: "3"
platform: "linux"
package: "libivykis-dev"
version: "0.43.2-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/iv_fatal"
---

# iv\_fatal(3)

ivykis fatal error condition handling

## NAME

iv\_fatal, iv\_set\_fatal\_msg\_handler - ivykis fatal error condition handling

## SYNOPSIS

**#include \<iv.h\>**

**void iv\_fatal(const char \****fmt***, ...);**\
 **void iv\_set\_fatal\_msg\_handler(void (\****handler***)(const char \****msg***));**\

## DESCRIPTION

**iv\_fatal** aborts the running program, after possibly emitting an error message. The **fmt** parameter is a [**printf**(3)](/printf/3.md)-style format string, the message to be logged.

If no handler is set (the default), the formatted message will be sent to **syslog**, with critical severity. Otherwise the **handler** as set by **iv\_set\_fatal\_msg\_handler** will be used instead.

**iv\_fatal** is also used internally by ivykis, whenever a fatal situation is detected.

**iv\_set\_fatal\_msg\_handler** can be used to set an alternative (as opposed to **syslog**) function to call from **iv\_fatal**, and its argument should be a function that does not return, and takes a single string as argument - the formatted error message.

## SEE ALSO

[**ivykis**(3)](/ivykis/3.md), [**iv\_examples**(3)](/iv_examples/3.md)
