GENDERS_ERRNUM(3)

πŸ’– GENDERS_ERRNUM(3) πŸ’–

ok so bestie, welcome to LIBGENDERS's error-handling corner of the world 🫢 this is where you find out why your genders call said no. she's not mad, she's just telling you what went wrong, and honestly? iconic behavior.


✨ NAME ✨

genders_errnum, genders_strerror, genders_errormsg, genders_perror β€” the genders error routines, aka your little emotional support squad when something breaks 😭


🌸 SYNOPSIS 🌸

#include <genders.h>

int genders_errnum(genders_t handle);

char *genders_strerror(int errnum);

char *genders_errormsg(genders_t handle);

void genders_perror(genders_t handle, const char *msg);

πŸ¦‹ DESCRIPTION πŸ¦‹

okok so here's the tea, function by function β˜•

  • genders_errnum() β€” hands you back the error code that's been chilling inside handle. that's it. that's the whole job. lowkey the MVP of the group πŸ’…
  • genders_strerror() β€” gives you a pointer to a string that describes the error code errnum. so like, it turns the cryptic number into actual words. she's a translator fr fr.

generally, the whole vibe is: you grab an error code with genders_errnum(), then you hand that code straight to genders_strerror() to find out what it means. that's the duo πŸŽ€

  • genders_errormsg() β€” gives you a pointer to a string describing the error stored in handle. no cap, it's logically equivalent to this:
char *genders_strerror(genders_errnum(genders_t handle));

so if you were gonna do both steps yourself, she already did it for you. main character energy honestly ✨

  • genders_perror() β€” this one is similar to perror(3). she prints a message to standard error output describing the error stored in handle. and listen: if msg is not NULL, then the string that msg points to gets printed first, followed by a colon, followed by a blank, and then the error message. so it reads like msg: the actual problem πŸ‘‘

πŸŽ€ FILES πŸŽ€

  • /usr/include/genders.h

no cap, if something is erroring and you don't know why, run it through this squad first. the numbers are not giving what you think they're giving πŸ™ˆ

and that's the whole page bestie, we ate and left no crumbs πŸ’… this lil number is from LLNL, dated August 2003, and it lives under the name GENDERS_ERRNUM(3) 🌈⭐ ily, go fix your errors, periodt πŸ¦‹πŸ’–