XtError(3)

πŸ’– XtError β€” low-level error handlers (from the XT COMPATIBILITY FUNCTIONS girlies) πŸ’–

okay bestie sit DOWN because we're doing XtError(3) and honestly? it's giving "your grandma's API that still works but everyone's moved on." four functions, all of them old news, all of them still in libXt because backwards compatibility is the real main character. let's get into it 🫢


✨ NAME ✨

XtError, XtSetErrorHandler, XtSetWarningHandler, XtWarning β€” the low-level error handler squad πŸ’…


🌸 SYNTAX 🌸

first you gotta pull the header in, no cap:

#include <X11/Intrinsic.h>

then here's the whole crew, verbatim, don't @ me:

_X_NORETURN void XtError(const char *message);

void XtSetErrorHandler(_X_NORETURN XtErrorHandler handler);

void XtSetWarningHandler(XtErrorHandler handler);

void XtWarning(const char *message);
heads up: XtError is marked _X_NORETURN β€” meaning it does not come back. it's a fatal girlie. she leaves and she does not text back. 😭

πŸŽ€ ARGUMENTS πŸŽ€

  • message β€” specifies the nonfatal error message that is to be reported.
  • handler β€” specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.
  • message β€” specifies the message that is to be reported.
yes bestie, message shows up twice in the list. that's not me being messy, that's just how it is in the original. two different functions, two different message args, one very tired documentation intern. πŸ₯²

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the tea is: every single one of these has been superseded. as in, replaced. as in, the new versions ate and left no crumbs. periodt. πŸ”₯

  • The XtError function has been superseded by XtAppError.
  • The XtSetErrorHandler function has been superseded by XtAppSetErrorHandler.
  • The XtSetWarningHandler function has been superseded by XtAppSetWarningHandler.
  • The XtWarning function has been superseded by XtAppWarning.

so like… they still exist, they still compile, but if you're writing new code with these you're lowkey living in the past. the XtApp* versions are the ones with the application context and honestly they just make more sense. no shade to the originals though, they were iconic first πŸ’œ


🌈 SEE ALSO 🌈

  • XtAppError(3)
  • X Toolkit Intrinsics - C Language Interface
  • Xlib - C Language X Interface

and that's the whole page, bestie, we ate and left zero crumbs ✨

this was libXt 1.3.1 energy, part of X Version 11, documented back on the XtError(3) page β€” sending you off with a kiss and a _X_NORETURN πŸŽ€πŸ’–πŸ¦‹ iykyk, fr fr

πŸ“¦ where this page comes from