WSLAY_EVENT_SET_ERROR(3)

πŸ’– WSLAY_EVENT_SET_ERROR β€” the wslay girlies' guide πŸ’–

okay bestie, so this one lives in the wslay manual (section 3, we love a library call) and it's genuinely so simple it's giving main character energy for like, four lines. let's get into it 🫢


✨ NAME ✨

wslay_event_set_error β€” Set error code πŸ’…


✨ SYNOPSIS ✨

#include <wslay/wslay.h>

void wslay_event_set_error(wslay_event_context_ptr ctx, int val)

✨ DESCRIPTION ✨

so wslay_event_set_error() does exactly one thing and does it flawlessly: it sets an error code so the library knows there's an error going on. that's it. that's the whole vibe. πŸ”₯

the way that this is typically used is inside your own user defined callback functions β€” like, you're in there doing your callback thing and something goes wrong, and you go "bestie, tell the library" and you call this. πŸŽ€

and listen, if you're sitting there like "okay but WHICH error code do I even pass??" β€” the manual says go read the description of the callback function to know which error code you should be using. it's giving iykyk, the callback docs are where the tea is β˜•βœ¨


✨ RETURN VALUE ✨

wslay_event_set_error() does not return value. nope, nothing, not a single one. it just sets and dips. no cap. πŸ’€


✨ AUTHOR ✨

Tatsuhiro Tsujikawa β€” the icon, the legend πŸ‘‘


2024, 2015, Tatsuhiro Tsujikawa 🌸


fr fr bestie, the only thing you need to remember: it sets the error code, it returns nothing, and you're probably calling it from inside a callback. slay. πŸ¦‹

and that's the whole page!! πŸ’œ this was wslay version @PACKAGE_VERSION@, dated Apr 22, 2024, and honestly? iconic. go forth and set your error codes responsibly. periodt. βœ¨πŸ’…πŸŒˆ

πŸ“¦ where this page comes from