GLib.Error (original) (raw)
Struct
GLibError
Description [src]
struct GError {
GQuark domain;
gint code;
gchar* message;
}
The GError
structure contains information about an error that has occurred.
Structure members
domain
Error domain, e.g. G_FILE_ERROR
.
code
Error code, e.g. G_FILE_ERROR_NOENT
.
message
Human-readable informative error message.
Constructors
g_error_new
Creates a new GError
with the given domain
and code
, and a message formatted with format
.
g_error_new_literal
Creates a new GError
; unlike g_error_new(), message
is not a printf()-style format string. Use this function ifmessage
contains text you don’t have control over, that could include printf()
escape sequences.
g_error_new_valist
Creates a new GError
with the given domain
and code
, and a message formatted with format
.
since: 2.22
Functions
g_error_domain_register
This function registers an extended GError
domain.error_type_name
will be duplicated. Otherwise does the same as g_error_domain_register_static().
since: 2.68
Instance methods
g_error_matches
Returns TRUE
if error
matches domain
and code
, FALSE
otherwise. In particular, when error
is NULL
, FALSE
will be returned.