Top | ![]() |
![]() |
![]() |
![]() |
GwyErrorList is a plain GSList containing pointers to GErrors as the data
members. You can use all GSList
functions on GwyErrorList, a few additional functions are provided for convenient error list handling Notice the
calling convention differs from the usual GSList functions and resembles more GError functions.
Errors are added to the list with gwy_error_list_add()
in a stack-like fashion, i.e. the most recent error is the
first item in the list.
There is no function to create a GwyErrorList because NULL
represents an empty list. All items in the list hold
some error, there are never any items with NULL
data members.
To clear all errors in the list and destroy the list, call gwy_error_list_clear()
.
void gwy_error_list_add (GwyErrorList **list
,GQuark domain
,gint code
,const gchar *format
,...
);
Adds a newly created error to an error list.
Does nothing if list
is NULL
. See also g_set_error()
.
void gwy_error_list_propagate (GwyErrorList **list
,GError *error
);
Moves an error to an error list.
The function does nothing if error
is NULL
, frees error
if list
is NULL
. Otherwise, it moves the error from
error
to list
, freeing error
. See also g_propagate_error()
.
void
gwy_error_list_clear (GwyErrorList **list
);
Clears all errors in an error list and destroys the list.
If list
is not NULL
, it is reset to an empty list, i.e. all errors are cleared and NULL
is assigned to the
location it points to.