FIDO_STRERR(3)

πŸ“¦
version 1.17.0 Β· 2 versions
  • 1.17.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.10.0 Β· ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FIDO_STRERR πŸ’–

okay bestie, welcome to fido_strerr from section 3 of the Library Functions Manual β€” she's a lil library function and she's here to translate your Ls into actual words 🫢


✨ NAME ✨

fido_strerr β€” FIDO2 error codes, but make it readable πŸ’…


🌸 SYNOPSIS 🌸

#include <fido.h>

const char *
fido_strerr(int n);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. the fido_strerr() function takes the error code n and translates it into a readable string, okay?? it's giving translator, it's giving interpreter, it's giving "your code is screaming and we're putting it into words" 😭

and where does n come from, you ask? n is an error code defined in <fido/err.h>. that's the vibe. that's the source. iykyk πŸ“–βœ¨

now here's the part that matters, so pay attention bestie πŸ‘‘

  • fido_strerr() never returns NULL. never ever. not once. no cap. so you can stop doing the paranoid null check, she's not gonna ghost you πŸ’–
  • the returned pointers point to static strings. so like, don't go freeing them, don't go mutating them, just... look at them and appreciate them 🌈

πŸ‘‘ the cute lil sign-off πŸ‘‘

this page came from Debian, dated May 25, 2018 β€” a whole classic, an icon, a legend, and honestly? she ate. periodt πŸ’…βœ¨πŸŽ€

static strings, never NULL, always iconic. that's the whole page bestie, go forth and log your errors pretty πŸ¦‹πŸ’œ
πŸ“¦ where this page comes from