The X Error Handlers dialog allows you to specify procedures for handling various kinds of X and Xt errors which are raised by the respective toolkits.
There are four kinds of error and warning handlers which can be registered.
An X Error Handler is a procedure which the programmer can specify in order to catch XErrorEvent events raised by the lower level X library (Xlib). The default X Error Handler tends to terminate the application program after simply logging the error message to the standard error stream. Since certain error types are certainly survivable, for example, an X_FreeColors error caused by attempting to free a Pixel in a read-only Colormap, the default Xlib error handler behaviour is certainly drastic: there is no reason why the program should not continue in these circumstances. Indeed, X-Designer itself installs an X error handler which silently ignores just this error. To install an application-specific X error handler, simply type in the name of a routine into the text field provided.
An X I/O Error Handler is a procedure which the programmer can specify in order to catch X I/O errors. Typically, these are related to the connection to the X server, and are generally not survivable by the application. If you install your own error handler, it does give you a chance to try and save application state in these most drastic of circumstances. X-Designer itself has such a handler which saves the current design to a file with a ".crash" extension. Again, simply type the name of your procedure into the text field provided for the purpose.
An Xt Error Handler is a routine installed to catch errors from the mid-level X Toolkit Intrinsics Library. Xt errors differ from Xlib errors in not generally being fatal. The default error handler in Xt pops up a warning dialog with a somewhat cryptic message, although some consideration of internationalization of the message concerned has been performed. Your application's users may not be particularly computer- or X-sophisticated, and so you may prefer to override the default behaviour and silently log such errors to file rather than frightening them through the default behavior.
An Xt Warning handler is very similar to an Xt Error Handler: the only difference is the logical status of the message. Again, you might like to override the default toolkit behavior and hide the messages from the user where appropriate by installing your own routine to process such messages.
In all cases, X-Designer will generate a prototype for the relevant handlers which you specify into the stubs file. You can edit the procedures in-line by pressing the associated "Edit code" button, just as you can edit callbacks, event handlers, or other X procedures added through the interface.
You are referred to your X documentation for XSetErrorHandler(3X), XSetIOErrorHandler(3X), XtAppSetErrorHandler(3X), XtAppSetWarningHandler(3X) for further information. See also: