AuSetErrorHandler(3)

πŸ“¦ version 1.9.5, in fedora 43, fedora 44

πŸ’– AuSetErrorHandler(3) β€” like, the audiolib error-handler glow-up πŸ’–

okay bestie, pull up a chair, we're in the Library Functions Manual and today's main character is AuSetErrorHandler. she's the one who decides what happens when your audio server connection gets a little messy but, like, not fatal messy. no cap. πŸŽ€


✨ Name ✨

AuSetErrorHandler β€” set nonfatal error handler

like… you're assigning a bestie to catch the drama when it's not, you know, the end of the world. πŸ’…


🌸 Synopsis 🌸

#include <audio/audiolib.h>

AuBool (*AuSetErrorHandler(server, handler))()
    AuServer *server;
    AuBool (*handler)(AuServer *, AuErrorEvent *);

yes she returns a function pointer, we love a return type with layers. periodt. πŸ¦‹


🫢 Arguments 🫢

  • server β€” the connection to the audio server, aka your little link to the sound-y mothership. she's the one you're setting the handler on. πŸ’œ
  • handler β€” the non-fatal error handler itself. and listen: use NULL to reinstall the default handler, fr fr. that's the factory reset of error-handling vibes. 🌈

πŸ‘‘ Description πŸ‘‘

so AuSetErrorHandler sets the non-fatal error handler and hands you back the previous handler, which is giving "here's the old one, she's yours now". πŸŽ€

this error handler gets invoked whenever a non-fatal error β€” an error event β€” is received. it's literally the designated responder for that exact situation, no cap.

and because this condition is not assumed to be fatal, it is totally acceptable for the error handler to return. like, you can just come back from it. she's allowed to finish her sentence. πŸ’…

BUT. bestie. listen to me. the error handler should not call any functions (directly or indirectly) on the server that will generate protocol requests, or that will look for input events. that's the line. don't cross it. not even indirectly, that's the sneaky way and it still counts. πŸ’€

so yeah β€” catch the vibe, don't poke the server while you're in there. iykyk. πŸ™ˆ


πŸ”₯ See Also πŸ”₯

  • AuServerName
  • AuGetErrorDatabaseText
  • AuGetErrorText
  • AuSetIOErrorHandler
  • AuSynchronize

audiolib β€” Network Audio System C Language Interface 🌸


and that's the whole page, bestie!! this was audiolib β€” error handling, version 1.9.5, dated AuSetErrorHandler(3). she ate and left no crumbs, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from