int (*XSetErrorHandler(handler))()
int (*handler)(Display *, XErrorEvent *)
Arguments
handler
Specifies the program's supplied error handler.
Description
Xlib generally calls the program's
supplied error handler whenever an error is received.
It is not called on
BadName
errors from
OpenFont,
LookupColor,
or
AllocNamedColor
protocol requests or on
BadFont
errors from a
QueryFont
protocol request.
These errors generally are reflected back to the program through the
procedural interface.
Because this condition is not assumed to be fatal,
it is acceptable for your error handler to return;
the returned value is ignored.
However, the error handler should not
call any functions (directly or indirectly) on the display
that will generate protocol requests or that will look for input events.
The previous error handler is returned.