XtErrorMsg(3)
π XtErrorMsg(3) β XT COMPATIBILITY FUNCTIONS π
okay bestie, we're in the X Toolkit Intrinsics manual, section 3, and today's topic is high-level error handlers β¨ the little squad of functions that goes by the name XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, and XtSetWarningMsgHandler. yes that's four whole names in one NAME line, they're a package deal, we don't split them up π«Ά
β¨ NAME β¨
XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, XtSetWarningMsgHandler β high-level error handlers π
πΈ SYNTAX πΈ
first things first, you gotta pull in the header or none of this exists:
#include <X11/Intrinsic.h>
then the four icons themselves:
_X_NORETURN void XtErrorMsg(const char *name, const char *type, const
char *class, const char *defaultMsg, String *params, Cardinal
*num_params);
void XtSetErrorMsgHandler(_X_NORETURN XtErrorMsgHandler msg_handler);
void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler);
void XtWarningMsg(const char *name, const char *type, const char *class,
const char *defaultMsg, String *params, Cardinal *num_params);
not me pointing out that_X_NORETURNonXtErrorMsgand on theXtErrorMsgHandlerinXtSetErrorMsgHandlerβ that's the compiler being told "this thing does NOT come back." it's giving final girl energy π
π ARGUMENTS π
classβ the resource class of the error message. yes, it has a class, it's fancy like that πdefaultβ the default message to use. the fallback fit, the backup outfit πnameβ the general kind of error. the vibe category, if you will β¨typeβ the detailed name of the error. likenamebut with receipts πmsg_handlerβ the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns. literally the whole personality of the handler in one arg πnum_paramsβ the number of values in the parameter list. count 'em π’paramsβ a pointer to a list of values to be stored in the message. the little payload that gets tucked into the message π
π¦ DESCRIPTION π¦
okay so here's the tea, and it's a whole superseded situation, no cap:
- The
XtErrorMsgfunction has been superseded byXtAppErrorMsg. π - The
XtSetErrorMsgHandlerfunction has been superseded byXtAppSetErrorMsgHandler. π - The
XtSetWarningMsgHandlerfunction has been superseded byXtAppSetWarningMsgHandler. π - The
XtWarningMsgfunction has been superseded byXtAppWarningMsg. π
fr fr, all four of these got replaced. they're the older generation of the family β still here, still valid, but theXtApp*versions are the main characters now. if you're writing new code, lowkey go say hi to theXtAppcrew instead π
π SEE ALSO π
go read these too, bestie, they're all connected:
XtAppErrorMsg(3)X Toolkit Intrinsics - C Language InterfaceXlib - C Language X Interface
and that's the whole page, periodt β¨ this was X Version 11, libXt 1.3.1, and we've been living in XtErrorMsg(3) the entire time π¦π go forth and handle your errors, you absolute icon π«Άπ
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright (c) 1993, 1994 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms