Previous: , Up: Errors   [Contents][Index]


17.1 Introduction

CLX error conditions are hierarchial. The base error condition is x-error, and all other conditions are built on top of x-error. x-error can be built on a lower-level condition that is implementation dependent (this is probably the error condition).

Macro: define-condition name (parent-types*) [(slot-specifier*) option*]

Any new condition type must be defined with the define-condition macro. A condition type has a name, parent types, report message, and any number of slot items. See the Lisp Reference manual for further information regarding define-condition.

The following are the predefined error conditions that can occur in CLX.

Condition: access-error

An access-error can occur for several reasons:

An access-error is a special case of the more general request-error (see request-error).

Condition: alloc-error

The server failed to allocate the requested resource or server memory.

An alloc-error is a special case of the more general request-error (see request-error).

Condition: atom-error

A value for an atom argument does not name a defined atom.

An atom-error is a special case of the more general request-error (see request-error).

Condition: closed-display

The closed-display condition is signaled when trying to read or write a closed display (that is, close-display has been called on the display object, or a server-disconnect occurred). The closed-display object is reported with the error.

A closed-display condition is a special case of the more general x-error (see x-error).

Condition: colormap-error

A value for a colormap argument does not name a defined colormap.

A colormap-error is a special case of the more general resource-error (see resource-error).

Condition: connection-failure

Signaled when an X11 server refuses a connection. The following items are reported along with the error:

A connection-failure is a special case of the more general x-error (see x-error).

Condition: cursor-error

A value for a cursor argument does not name a defined cursor.

A cursor-error is a special case of the more general resource-error (see resource-error).

Condition: device-busy

Signaled by (setf (pointer-mapping display) mapping) when the set-pointer-mapping request returns a busy status. A similar condition occurs in set-modifier-mapping, but in this case, it returns a boolean indicating success, rather than signaling an error. The device-busy condition returns the display object as part of the error.

A device-busy condition is a special case of the more general x-error (see x-error).

Condition: drawable-error

A value for a drawable argument does not name a defined window or pixmap.

A drawable-error is a special case of the more general resource-error (see resource-error).

Condition: font-error

A value for a font or gcontext argument does not name a defined font.

A font-error is a special case of the more general resource-error (see resource-error).

Condition: gcontext-error

A value for a gcontext argument does not name a defined GContext.

A gcontext-error is a special case of the more general resource-error (see resource-error).

Condition: id-choice-error

The value chosen for a resource identifier is either not included in the range assigned to the client or is already in use. Under normal circumstances, this cannot occur and should be considered a server or CLX library error.

An id-choice-error is a special case of the more general resource-error (see resource-error).

Condition: implementation-error

The server does not implement some aspect of the request. A server that generates this error for a core request is deficient. As such, this error is not listed for any of the requests. However, clients should be prepared to receive such errors and either handle or discard them.

An implementation-error is a special case of the more general resource-error (see resource-error).

Condition: length-error

The length of a request is shorter or longer than that minimally required to contain the arguments. This usually means an internal CLX error.

A length-error is a special case of the more general resource-error (see resource-error).

Condition: lookup-error

CLX has the option of caching different resource types (see *clx-cached-types*) in a hash table by resource ID. When looking up an object in the hash table, if the type of the object is wrong, a lookup-error is signaled.

For example: The cursor with ID 123 is interned in the hash table. An event is received with a field for window 123. When 123 is looked up in the hash table, a cursor is found. Since a window was expected, a lookup-error is signaled. This error indicates a problem with the extension code being used. The following items are reported along with the error:

A lookup-error is a special case of the more general x-error (see x-error).

Condition: match-error

In a graphics request, the root and depth of the GContext does not match that of the drawable. An :input-only window is used as a drawable. Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. An :input-only window locks this attribute. The values do not exist for an :input-only window.

A match-error is a special case of the more general request-error (see request-error).

Condition: missing-parameter

One or more of the required keyword parameters is missing or nil. The missing parameters are reported along with the error.

A missing-parameter condition is a special case of the more general x-error (see x-error).

Condition: name-error

A font or color of the specified name does not exist.

A name-error is a special case of the more general request-error (see request-error).

Condition: pixmap-error

A value for a pixmap argument does not name a defined pixmap.

A pixmap-error is a special case of the more general resource-error. (see resource-error.)

Condition: reply-length-error (x-error) (slots*)

The reply to a request has an unexpected length. The following items are reported along with the error:

A reply-length-error is a special case of the more general x-error (see x-error).

Condition: reply-timeout

The *reply-timeout* parameter specifies the maximum number of seconds to wait for a request reply, or nil to wait forever (the default). When a reply has not been received after *reply-timeout* seconds, the reply-timeout condition is signaled. The timeout period and display are reported along with the error.

A reply-timeout condition is a special case of the more general x-error (see x-error).

Condition: request-error

The following items are reported along with the error:

The major or minor opcode does not specify a valid request.

A request-error condition is a special case of the more general x-error (see x-error).

Condition: resource-error

All X11 errors for incorrect resource IDs are built on top of resource-error. These are colormap-error, cursor-error, drawable-error, font-error, gcontext-error, id-choice-error, pixmap-error and window-error. resource-error is never signaled directly.

A resource-error is a special case of the more general request-error (see request-error).

Condition: sequence-error

All X11 request replies contain the sequence number of their request. If a reply’s sequence does not match the request count, a sequence-error is signaled. A sequence-error usually indicates a locking problem with a multi-processing Lisp. The following items are reported along with the error:

A sequence-error condition is a special case of the more general x-error. (see x-error)

Condition: server-disconnect

The connection to the server was lost. The display on which the error occurred is reported along with the error.

A server-disconnect condition is a special case of the more general x-error. (see x-error)

Condition: unexpected-reply

A reply was found when none was expected. This indicates a problem with the extension code. The following items are reported along with the error:

display

The display on which the error occurred.

req-sequence

The sequence number in the reply.

msg-sequence

The current sequence number.

length

The message length of the reply.

An unexpected-reply condition is a special case of the more general x-error. (see x-error.)

Condition: unknown-error (request-error) (error-code)

An error was received from the server with an unknown error code. This indicates a problem with the extension code. The undefined error code is reported.

An unknown-error is a special case of the more general request-error. (see request-error)

Condition: value-error (request-error) (value)

Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted. Any argument defined as a set of alternatives can generate this error. The erroneous value is reported.

A value-error is a special case of the more general request-error. (see request-error)

Condition: window-error (resource-error)

A value for a window argument does not name a defined window.

A window-error is a special case of the more general resource-error. (see resource-error.)

Condition: x-error

This is the most general error condition upon which all other conditions are defined.


Previous: , Up: Errors   [Contents][Index]