Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtErrorHand(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtAppError(1)

XtAppSetErrorHandler(1)

XtAppSetWarningHandler(1)

XtAppWarning(1)

 

Name

XtErrorHandler — prototype for low-level error and warning handlers. 

Synopsis

typedef void (∗XtErrorHandler)(String);

    String message;

Arguments

messageSpecifies the error message. 

Description

The function registered by XtAppSetErrorHandler and XtAppSetWarningHandler is of type XtErrorHandler. 

The error handler should display the message string in some appropriate fashion.  Some applications may wish to log errors to a file as well. 

Examples

The default handlers simply print a message to standard error, and exit (for errors) or return (for warnings), as shown below:

static void _XtDefaultError(message)
    String message;
{
    extern void exit();
     (void)fprintf(stderr, "X Toolkit Error: %s\n", message);
    exit(1);
}
 static void _XtDefaultWarning(message)
    String message;
{
    (void)fprintf(stderr, "X Toolkit Warning: %s\n", message);
    return;
}

See Also

XtAppError(1), XtAppSetErrorHandler(1), XtAppSetWarningHandler(1), XtAppWarning(1). 

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