Package ch.bailu.gtk.glib
Klasse Error
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.Error
- Alle implementierten Schnittstellen:
PointerInterface
The `GError` structure contains information about
an error that has occurred.
an error that has occurred.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungError()
Creates a new #GError with the given @domain and @code,
and a message formatted with @format.Creates a new #GError with the given @domain and @code,
and a message formatted with @format.Error
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcopy()
Makes a copy of @error.static int
domainRegister
(Str error_type_name, long error_type_private_size, Error.OnErrorInitFunc error_type_init, Error.OnErrorCopyFunc error_type_copy, Error.OnErrorClearFunc error_type_clear) This function registers an extended #GError domain.static int
domainRegisterStatic
(Str error_type_name, long error_type_private_size, Error.OnErrorInitFunc error_type_init, Error.OnErrorCopyFunc error_type_copy, Error.OnErrorClearFunc error_type_clear) This function registers an extended #GError domain.void
free()
Frees a #GError and associated resources.static ClassHandler
int
error code, e.g.int
error domain, e.g.human-readable informative error messagestatic int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
matches
(int domain, int code) Returns %TRUE if @error matches @domain and @code, %FALSE
otherwise.static Error
newLiteralError
(int domain, int code, Str message) Creates a new #GError; unlike g_error_new(), @message is
not a printf()-style format string.static Error
newLiteralError
(int domain, int code, String message) Creates a new #GError; unlike g_error_new(), @message is
not a printf()-style format string.void
setFieldCode
(int code) error code, e.g.void
setFieldDomain
(int domain) error domain, e.g.void
setFieldMessage
(Str message) human-readable informative error messageVon Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
DOMAIN
error domain, e.g. %G_FILE_ERROR- Siehe auch:
-
CODE
error code, e.g. %G_FILE_ERROR_NOENT- Siehe auch:
-
MESSAGE
human-readable informative error message- Siehe auch:
-
-
Konstruktordetails
-
Error
-
Error
public Error() -
Error
Creates a new #GError with the given @domain and @code,
and a message formatted with @format.- Parameter:
domain
- error domaincode
- error codeformat
- printf()-style format for error message_ellipsis
- parameters for message format
-
Error
Creates a new #GError with the given @domain and @code,
and a message formatted with @format.- Parameter:
domain
- error domaincode
- error codeformat
- printf()-style format for error message_ellipsis
- parameters for message format
-
-
Methodendetails
-
getClassHandler
-
setFieldDomain
public void setFieldDomain(int domain) error domain, e.g. %G_FILE_ERROR -
getFieldDomain
public int getFieldDomain()error domain, e.g. %G_FILE_ERROR -
setFieldCode
public void setFieldCode(int code) error code, e.g. %G_FILE_ERROR_NOENT -
getFieldCode
public int getFieldCode()error code, e.g. %G_FILE_ERROR_NOENT -
setFieldMessage
human-readable informative error message -
getFieldMessage
human-readable informative error message -
newLiteralError
Creates a new #GError; unlike g_error_new(), @message is
not a printf()-style format string. Use this function if
@message contains text you don't have control over,
that could include printf() escape sequences.- Parameter:
domain
- error domaincode
- error codemessage
- error message- Gibt zurück:
- a new #GError
-
newLiteralError
Creates a new #GError; unlike g_error_new(), @message is
not a printf()-style format string. Use this function if
@message contains text you don't have control over,
that could include printf() escape sequences.- Parameter:
domain
- error domaincode
- error codemessage
- error message- Gibt zurück:
- a new #GError
-
copy
Makes a copy of @error.- Gibt zurück:
- a new #GError
-
free
public void free()Frees a #GError and associated resources. -
matches
public boolean matches(int domain, int code) Returns %TRUE if @error matches @domain and @code, %FALSE
otherwise. In particular, when @error is %NULL, %FALSE will
be returned.
If @domain contains a `FAILED` (or otherwise generic) error code,
you should generally not check for it explicitly, but should
instead treat any not-explicitly-recognized error code as being
equivalent to the `FAILED` code. This way, if the domain is
extended in the future to provide a more specific error code for
a certain case, your code will still work.- Parameter:
domain
- an error domaincode
- an error code- Gibt zurück:
- whether @error has @domain and @code
-
domainRegister
public static int domainRegister(@Nonnull Str error_type_name, long error_type_private_size, Error.OnErrorInitFunc error_type_init, Error.OnErrorCopyFunc error_type_copy, Error.OnErrorClearFunc error_type_clear) This function registers an extended #GError domain.
@error_type_name will be duplicated. Otherwise does the same as
g_error_domain_register_static().- Parameter:
error_type_name
- string to create a #GQuark fromerror_type_private_size
- size of the private error data in byteserror_type_init
- function initializing fields of the private error dataerror_type_copy
- function copying fields of the private error dataerror_type_clear
- function freeing fields of the private error data- Gibt zurück:
- #GQuark representing the error domain
-
domainRegisterStatic
public static int domainRegisterStatic(@Nonnull Str error_type_name, long error_type_private_size, Error.OnErrorInitFunc error_type_init, Error.OnErrorCopyFunc error_type_copy, Error.OnErrorClearFunc error_type_clear) This function registers an extended #GError domain.
@error_type_name should not be freed. @error_type_private_size must
be greater than 0.
@error_type_init receives an initialized #GError and should then initialize
the private data.
@error_type_copy is a function that receives both original and a copy
#GError and should copy the fields of the private error data. The standard
#GError fields are already handled.
@error_type_clear receives the pointer to the error, and it should free the
fields of the private error data. It should not free the struct itself though.
Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it
already takes care of passing valid information to this function.- Parameter:
error_type_name
- static string to create a #GQuark fromerror_type_private_size
- size of the private error data in byteserror_type_init
- function initializing fields of the private error dataerror_type_copy
- function copying fields of the private error dataerror_type_clear
- function freeing fields of the private error data- Gibt zurück:
- #GQuark representing the error domain
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-