gnu.x11
Class Error

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by gnu.x11.Error
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Error

public class Error
extends java.lang.Error

X server core error. This class is based on Error instead of Exception or RuntimeException because X server error should be regarded as fatal. Instead of setting error handler with XSetErrorHandler in C programming, we should utilize the exception facility of Java programming.

See Also:
Serialized Form

Field Summary
 int bad
           
static int BAD_ACCESS
          A client attempts to grab a key/button combination already grabbed by another client.
static int BAD_ALLOC
          The server fails to allocate the requested resource.
static int BAD_ATOM
          A value for an Atom argument does not name a defined Atom.
static int BAD_COLORMAP
          A value for a Colormap argument does not name a defined Colormap.
static int BAD_CURSOR
          A value for a cursor argument does not name a defined cursor.
static int BAD_DRAWABLE
          A value for a drawable argument does not name a defined window or pixmap.
static int BAD_FONT
          A value for a font argument does not name a defined font (or, in some cases, GContext).
static int BAD_GC
          A value for a GContext argument does not name a defined GContext.
static int BAD_ID_CHOICE
          The value chosen for a resource identifier either is not included in the range assigned to the client or is already in use.
static int BAD_IMPLEMENTATION
          The server does not implement some aspect of the request.
static int BAD_LENGTH
          The length of a request is shorter or longer than that required to contain the arguments.
static int BAD_MATCH
          In a graphics request, the root and depth of the graphics context do not match those of the drawable.
static int BAD_NAME
          A font or color of the specified name does not exist.
static int BAD_PIXMAP
          A value for a pixmap argument does not name a defined pixmap.
static int BAD_REQUEST
          The major or minor opcode does not specify a valid request.
static int BAD_VALUE
          Some numeric value falls outside of the range of values accepted by the request.
static int BAD_WINDOW
          A value for a window argument does not name a defined window.
 int code
           
static java.lang.String[] ERROR_STRINGS
           
 int major_opcode
           
 int minor_opcode
           
static java.lang.String[] OPCODE_STRINGS
           
 int seq_no
           
static int SUCCESS
           
 
Constructor Summary
Error(Display display, java.lang.String error_string, int code, int seq_no, int bad, int minor_opcode, int major_opcode)
           
Error(java.lang.String s)
           
 
Method Summary
static java.lang.String init(Display display, java.lang.String error_string, int code, int seq_no, int bad, int minor_opcode, int major_opcode)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values

BAD_REQUEST

public static final int BAD_REQUEST
The major or minor opcode does not specify a valid request. This usually is an Xlib or server error.

See Also:
Constant Field Values

BAD_VALUE

public static final int BAD_VALUE
Some numeric value falls outside of 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 typically can generate this error (due to the encoding).

See Also:
Constant Field Values

BAD_WINDOW

public static final int BAD_WINDOW
A value for a window argument does not name a defined window.

See Also:
Constant Field Values

BAD_PIXMAP

public static final int BAD_PIXMAP
A value for a pixmap argument does not name a defined pixmap.

See Also:
Constant Field Values

BAD_ATOM

public static final int BAD_ATOM
A value for an Atom argument does not name a defined Atom.

See Also:
Constant Field Values

BAD_CURSOR

public static final int BAD_CURSOR
A value for a cursor argument does not name a defined cursor.

See Also:
Constant Field Values

BAD_FONT

public static final int BAD_FONT
A value for a font argument does not name a defined font (or, in some cases, GContext).

See Also:
Constant Field Values

BAD_MATCH

public static final int BAD_MATCH
In a graphics request, the root and depth of the graphics context do not match those of the drawable. An InputOnly window is used as a drawable. Some argument or pair of arguments has the correct type and range, but it fails to match in some other way required by the request. An InputOnly window lacks this attribute.

See Also:
Constant Field Values

BAD_DRAWABLE

public static final int BAD_DRAWABLE
A value for a drawable argument does not name a defined window or pixmap.

See Also:
Constant Field Values

BAD_ACCESS

public static final int BAD_ACCESS
A client attempts to grab a key/button combination already grabbed by another client.

A client attempts to free a colormap entry that it had not already allocated or to free an entry in a colormap that was created with all entries writable.

A client attempts to store into a read-only or unallocated colormap entry.

A client attempts to modify the access control list from other than the local (or otherwise authorized) host.

A client attempts to select an event type that another client has already selected.

See Also:
Constant Field Values

BAD_ALLOC

public static final int BAD_ALLOC
The server fails to allocate the requested resource. Note that the explicit listing of BadAlloc errors in requests only covers allocation errors at a very coarse level and is not intended to (nor can it in practice hope to) cover all cases of a server running out of allocation space in the middle of service. The semantics when a server runs out of allocation space are left unspecified, but a server may generate a BadAlloc error on any request for this reason, and clients should be prepared to receive such errors and handle or discard them.

See Also:
Constant Field Values

BAD_COLORMAP

public static final int BAD_COLORMAP
A value for a Colormap argument does not name a defined Colormap.

See Also:
Constant Field Values

BAD_GC

public static final int BAD_GC
A value for a GContext argument does not name a defined GContext.

See Also:
Constant Field Values

BAD_ID_CHOICE

public static final int BAD_ID_CHOICE
The value chosen for a resource identifier either is 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 Xlib error.

See Also:
Constant Field Values

BAD_NAME

public static final int BAD_NAME
A font or color of the specified name does not exist.

See Also:
Constant Field Values

BAD_LENGTH

public static final int BAD_LENGTH
The length of a request is shorter or longer than that required to contain the arguments. This is an internal Xlib or server error. The length of a request exceeds the maximum length accepted by the server.

See Also:
Constant Field Values

BAD_IMPLEMENTATION

public static final int BAD_IMPLEMENTATION
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, but clients should be prepared to receive such errors and handle or discard them.

See Also:
Constant Field Values

ERROR_STRINGS

public static final java.lang.String[] ERROR_STRINGS

OPCODE_STRINGS

public static final java.lang.String[] OPCODE_STRINGS

code

public int code

seq_no

public int seq_no

bad

public int bad

minor_opcode

public int minor_opcode

major_opcode

public int major_opcode
Constructor Detail

Error

public Error(java.lang.String s)

Error

public Error(Display display,
             java.lang.String error_string,
             int code,
             int seq_no,
             int bad,
             int minor_opcode,
             int major_opcode)
Method Detail

init

public static java.lang.String init(Display display,
                                    java.lang.String error_string,
                                    int code,
                                    int seq_no,
                                    int bad,
                                    int minor_opcode,
                                    int major_opcode)