XGetErrorDatabaseText

Syntax

XGetErrorDatabaseText(display, name, message, default_string, buffer_return, length)
      Display *display;
      char *name, *message;
      char *default_string;
      char *buffer_return;
      int length;

Arguments

display Specifies the connection to the X server.
name Specifies the name of the application.
message Specifies the type of the error message.
default_string Specifies the default error message if none is found in the database.
buffer_return Returns the error description.
length Specifies the size of the buffer.

Description

The XGetErrorDatabaseText() function returns a null-terminated message (or the default message) from the error message database. Xlib uses this function internally to look up its error messages. The text in the default_string argument is assumed to be in the encoding of the current locale, and the text stored in the buffer_return argument is in the encoding of the current locale.

The name argument should generally be the name of your application. The message argument should indicate which type of error message you want. If the name and message are not in the Host Portable Character Encoding, the result is implementation dependent. Xlib uses three predefined ``application names'' to report errors. In these names, uppercase and lowercase matter.
XProtoError The protocol error number is used as a string for the message argument.
XlibMessage These are the message strings that are used internally by the library.
XRequest For a core protocol request, the major request protocol number is used for the message argument. For an extension request, the extension name (as given by InitExtension()) followed by a period (.) and the minor request protocol number is used for the message argument. If no string is found in the error database, the default_string is returned to the buffer argument.

See also

XDisplayName(), XGetErrorText(), XOpenDisplay(), XSetErrorHandler(), XSetIOErrorHandler(), XSynchronize(), "Using the Default Error Handlers".
Christophe Tronche, ch@tronche.com