Name
XtAppErrorMsg — call the high-level fatal error handler.
Synopsis
void XtAppErrorMsg(app_context, name, type, class, default, params, num_params)
XtAppContext app_context;
String name;
String type;
String class;
String default;
String ∗params;
Cardinal ∗num_params;
Arguments
app_context
Specifies the application context.
nameSpecifies the general kind of error; for example, InvalidParameter.
typeSpecifies the detailed name of the error. This is specified using printf-like syntax, with the parameters and number of parameters specified by params and num_params.
classSpecifies the resource class.
defaultSpecifies the default message to use if no message is found in the database.
paramsSpecifies a pointer to a list of values to be stored in the type argument when the message is generated.
num_params
Specifies the number of values in the parameter list.
Description
Xt provides two levels of error handling:
•A high-level interface that takes an error name and class and looks the error up in an error resource database.
•A low-level interface that takes a simple string, which is printed out as the error message.
The high-level functions construct a string to pass to the lower-level interface. The name and type arguments are concatenated to form the "name" that is used to look up a message in the error database. On POSIX-based systems, the error database is usually /usr/lib/X11/XtErrorDB.
In theory, most programs should use XtAppErrorMsg, not XtAppError, so that the programs can be easily customized to provide international or other custom error messages. However, the low-level handlers are much easier to use.
XtAppError calls the low-level fatal error handler. Fatal errors are assumed to be catastrophic and irrecoverable. A warning error handler also exists for errors that require attention but do not preempt a program running correctly to a normal successful completion. (XtAppWarning calls the corresponding non-fatal error handler. XtAppErrorMsg and XtAppWarningMsg call the corresponding high-level handlers.)
The Intrinsics internal errors all have class XtToolkitError.
See Also
XtAppError(1), XtAppSetErrorHandler(1), XtAppSetErrorMsgHandler(1), XtAppSetWarningHandler(1), XtAppSetWarningMsgHandler(1), XtAppWarning(1), XtAppWarningMsg(1),
XtErrorHandler(2).