NODEUPDOWN_ERRNUM(3)

πŸ“¦ version 1.14, in epel 9, fedora 43, fedora 44

✨ NODEUPDOWN_ERRNUM(3) ✨

okay bestie, so this is a page from libnodeupdown and it's literally just the error-handling squad πŸ’– β€” nodeupdown_errnum, nodeupdown_strerror, nodeupdown_errormsg, and nodeupdown_perror. Four little icons whose whole job is telling you what went wrong. no cap.


🌸 NAME 🌸

nodeupdown_errnum, nodeupdown_strerror, nodeupdown_errormsg, nodeupdown_perror β€” the nodeupdown error routines 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <nodeupdown.h>

int nodeupdown_errnum(nodeupdown_t handle);

char *nodeupdown_strerror(int errnum);

char *nodeupdown_errormsg(nodeupdown_t handle);

void nodeupdown_perror(nodeupdown_t handle, const char *msg);

πŸ’… DESCRIPTION πŸ’…

nodeupdown_errnum()</purlple> returns the error code stored in handle. that's it. that's the function. it just hands you the lil error code and goes 🫑

nodeupdown_strerror() returns a pointer to a string describing the error code errnum. so like, you give it a number, it gives you words. iconic behavior honestly.

Generally, the way this whole situationship works is: you grab an error code with nodeupdown_errnum(), then you pass that code straight into nodeupdown_strerror(). boom. two-step pipeline. πŸ’…

nodeupdown_errormsg() returns a pointer to a string describing the error stored in handle. and the way that it's logically equivalent to this:

char *nodeupdown_strerror(nodeupdown_errnum(nodeupdown_t handle));

fr fr, that's the whole vibe. it's the combo move, pre-packaged. 🎁

nodeupdown_perror() is giving perror(3) energy ✨. It produces a message on standard error output describing the error stored in handle. And if msg is not NULL, the string pointed to by msg, a colon, and a blank are printed before the error message. so it's like your message here: actual error. cute, labeled, organized. main character formatting. πŸ’–


πŸ“ FILES πŸ“

  • /usr/include/nodeupdown.h

🌈 SEE ALSO 🌈

okay technically there's no SEE ALSO section on this page but perror(3) got a shoutout up in the description, so go say hi to it. iykyk πŸ¦‹


and that's the whole page, bestie!! four error functions, one header file, zero drama. slay. πŸ’–βœ¨

this lil masterpiece came from LLNL and it's dated August 2003 β€” yeah, it's been serving error messages since before some of us were born πŸ’€πŸ‘‘

πŸ“¦ where this page comes from