Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtErrorMsg(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtError(1)

XtSetErrorHandler(1)

XtSetWarningHandler(1)

XtWarning(1)

XtWarningMsg(1)

 

Name

XtErrorMsg — call the high-level fatal error handler. 

Synopsis

void XtErrorMsg(name, type, class, default, params, num_params)

    String name;
    String type;
    String class;
    String default;
    String ∗params;
    Cardinal ∗num_params;

Arguments

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

XtErrorMsg is superseded by XtAppErrorMsg.  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 called /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 nonfatal error handler.  XtAppErrorMsg and XtAppWarningMsg call the corresponding high-level handlers.)  The Intrinsics internal errors all have class XtToolkitError. 

See Also

XtError(1), XtSetErrorHandler(1), XtSetWarningHandler(1), XtWarning(1), XtWarningMsg(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026