org.gnu.glib

Class Error


public class Error
extends Boxed

The class represents an internal representation of an Error from the GTK and GNOME libraries. It should never be returned to the application layer. The Java-GNOME API should throw an exception that contains the relevant information contained within this object. This resource must be freed when you are finished with it via the free() method.

Field Summary

Fields inherited from class org.gnu.glib.Boxed

handle

Constructor Summary

Error(Handle handle)
Error(Quark domain, int code, String message)
Construct a new Error object.

Method Summary

protected void
finalize()
protected static void
g_error_free(Handle error)
protected static Handle
g_error_new_literal(Handle domain, int code, String message)
protected static int
getCode(Handle obj)
Quark
getDomain()
Return the domain for this error.
protected static Handle
getDomain(Handle obj)
int
getErrorCode()
Return the error code associated with this error.
String
getErrorMessage()
Return the error message associated with this error.
protected static String
getMessage(Handle obj)

Methods inherited from class org.gnu.glib.Boxed

equals, getHandle, hashCode, setHandle

Constructor Details

Error

public Error(Handle handle)


Error

public Error(Quark domain,
             int code,
             String message)
Construct a new Error object. This object is used to retrieve errors from the native layer. The java-gnome library will rarely return an object of this type. It will convert it into an exception that will be thrown to the application layer.

Method Details

finalize

protected void finalize()
            throws Throwable


g_error_free

protected static final void g_error_free(Handle error)


g_error_new_literal

protected static final Handle g_error_new_literal(Handle domain,
                                                  int code,
                                                  String message)


getCode

protected static final int getCode(Handle obj)


getDomain

public Quark getDomain()
Return the domain for this error.

Returns:
The Quark object that represents the domain for this error.


getDomain

protected static final Handle getDomain(Handle obj)


getErrorCode

public int getErrorCode()
Return the error code associated with this error.

Returns:
The error code for this error.


getErrorMessage

public String getErrorMessage()
Return the error message associated with this error.

Returns:
The error message for this error.


getMessage

protected static final String getMessage(Handle obj)