emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

X error handler


From: Chong Yidong
Subject: X error handler
Date: Sun, 26 Feb 2006 21:59:18 -0500

Currently, if Emacs receives an X protocol error and x_catch_errors
has not been called, Emacs will kill itself (x_error_handler calls
x_error_quitter, which calls x_connection_closed).  This seems
unnecessary.

Xlib defines two types of X error handlers.  The protocol error
handler (for us, this is x_error_handler) is intended for non-fatal X
protocol errors.  Fatal errors such as losing the connection to the X
server invoke a different handler, the X IO error handler (for us,
this is x_io_error_quitter), which really is supposed to kill Emacs.

Currently, about half the uses of x_catch_errors in Emacs code occur
where we want to make an Xlib call that can produce protocol
errors---we don't want those to kill Emacs, but we don't actually care
about whatever error messages are emitted.  It makes little sense to
go through xmalloc'ing an error message storage stack, etc., for this.

It seems to me cleaner to make the protocol error handler do nothing
by default (rather than kill Emacs).  When x_catch_errors is on, we
can carry out the current behavior, i.e., storing the error string
etc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]