iv_fatal(3)
β¨ iv_fatal β ivykis programmer's manual β¨
okay bestie, pull up a chair, because we're talking about iv_fatal(3) and iv_set_fatal_msg_handler β the ivykis fatal error condition handling duo πβ¨ iykyk.
π 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 π
so. iv_fatal aborts the running program π β like, the whole thing, gone β but it might emit an error message first. That fmt parameter? It's a printf(3)-style format string, and it's literally the message that gets logged. Very demure, very mindful of your logs.
If no handler is set (which is the default, the factory setting, the no-makeup-makeup look), then the formatted message gets sent to syslog, with critical severity π₯. Otherwise, the handler you set with iv_set_fatal_msg_handler is used instead. Your handler, your rules π
.
Also important: iv_fatal is also used internally by ivykis, whenever a fatal situation is detected. So she's not just a public-facing icon, she's working behind the scenes too. main character energy fr fr π
Now, iv_set_fatal_msg_handler β you use this to set an alternative function to call from iv_fatal, as opposed to syslog. And the argument you pass should be a function that does not return, and takes a single string as its argument β that string being the formatted error message. No cap: if your handler returns, you've broken the vibe. It's giving "must not return" periodt.
β οΈ warning bestie: the handler you set has to not return, and it takes exactly one string argument β the formatted error message. Don't get cute with it.
πΈ SEE ALSO πΈ
and that's the whole page, bestie π«Ά go forth and handle your fatal errors with grace ππ§β¨
ivykis Β· 2012-06-18 Β· iv_fatal(3) β mwah, iconic, no notes π
π
π¦ where this page comes from
- alpine 3.22: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.23: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.24: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- debian bookworm: libivykis-dev 0.42.4-1
- debian trixie: libivykis-dev 0.43.2-1+b1
- epel 10: ivykis-devel 0.43.2-2.el10_0 Β· LicenseRef-Callaway-LGPLv2+
- epel 9: ivykis-devel 0.42.4-7.el9 Β· LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixpkgs unstable: libivykis 0.43.2
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- ubuntu jammy: libivykis-dev 0.42.4-1
- ubuntu noble: libivykis-dev 0.43-1build1
- ubuntu questing: libivykis-dev 0.43.2-1
- ubuntu resolute: libivykis-dev 0.43.2-1build1
- ubuntu stonking: libivykis-dev 0.43.2-1build1
- Copyright (C) 2012 Lennert Buytenhek
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms