shisa_strerror(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shisa_strerror(3) β€” the shishi manual, bestie edition πŸ’–

okay so real talk, this one is a lil function from the shishi manual, section 3, and it's genuinely one of the most underrated lil helpers out there. it turns a sad cryptic error number into actual words. no cap. πŸ¦‹


✨ NAME ✨

shisa_strerror β€” API function πŸ’…


🌸 SYNOPSIS 🌸

#include <shisa.h>

const char * shisa_strerror(int err);

πŸŽ€ ARGUMENTS πŸŽ€

  • int err β€” the Shisa error code, babe. it's an int. it's the thing you got back that made you go "what does this MEAN". 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

it explains, verbally, an error status err. like, it takes your mystery number and goes "oh bestie, here's what happened."

the returned string can be used to compose a diagnostic message of benefit to a user. so basically you can drop it right into a message and your users will actually understand what went wrong instead of staring at -17 like it's a riddle. iconic behaviour fr fr. ✨


🌈 RETURN VALUE 🌈

it returns a pointer to a statically allocated string containing a description of the error you gave it as the input argument.

lowkey important: statically allocated means you didn't allocate it, you don't own it, so do NOT go freeing it. it's not yours, it's the library's. respect the string. πŸ™ˆ

πŸ’€ REPORTING BUGS πŸ’€

found a bug? spill. report bugs to <bug-shishi@gnu.org>.


Copyright Β© 2002-2022 Simon Josefsson.

copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so yes, share it, remix it, it's giving generous. πŸŽ€


⭐ SEE ALSO ⭐

the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. that's the whole lore, iykyk. πŸ“–


mwah, that's the page πŸ’œ β€” this was shishi version 1.0.3, and the copyright vibes run 2002-2022, so go forth and strerror responsibly, bestie. 🫢✨