| Top |
| #define | GO_INIT_RET_ERROR_INFO() |
| void | go_error_info_add_details () |
| void | go_error_info_add_details_list () |
| void | go_error_info_free () |
| GOErrorInfo * | go_error_info_new_from_errno () |
| GOErrorInfo * | go_error_info_new_from_error_list () |
| GOErrorInfo * | go_error_info_new_printf () |
| GOErrorInfo * | go_error_info_new_str () |
| GOErrorInfo * | go_error_info_new_str_with_details () |
| GOErrorInfo * | go_error_info_new_str_with_details_list () |
| GOErrorInfo * | go_error_info_new_vprintf () |
| GSList * | go_error_info_peek_details () |
| char const* | go_error_info_peek_message () |
| GOSeverity | go_error_info_peek_severity () |
| void | go_error_info_print () |
void go_error_info_add_details (GOErrorInfo *error,GOErrorInfo *details);
Takes ownership of details
and adds it to the details of error
. If
details
has no message, its details are merged into error
and the empty
container is released. Does nothing if details
is NULL.
void go_error_info_add_details_list (GOErrorInfo *error,GSList *details);
Takes ownership of details
and all its elements, adding them to the
details of error
. Empty containers in details
are replaced by their own
details. Does nothing if details
is NULL.
error |
||
details |
a list of GOErrorInfo to add. |
[element-type GOErrorInfo][transfer full][nullable] |
void
go_error_info_free (GOErrorInfo *error);
Releases a reference on error
. When the last reference is released, the
message and all attached details are freed. Does nothing if error
is NULL.
GOErrorInfo *
go_error_info_new_from_errno (void);
Creates a new GOErrorInfo with severity GO_ERROR and a message
describing the current value of errno (see g_strerror()).
GOErrorInfo *
go_error_info_new_from_error_list (GSList *errors);
Creates a new GOErrorInfo from errors
. If errors
contains a single
error, that error is returned directly; otherwise the errors are attached
as details to a new error with no message.
GOErrorInfo * go_error_info_new_printf (char const *msg_format,...);
Creates a new GOErrorInfo with severity GO_ERROR and a message built
from msg_format
and the provided arguments.
GOErrorInfo *
go_error_info_new_str (char const *msg);
Creates a new GOErrorInfo with severity GO_ERROR and no details.
GOErrorInfo * go_error_info_new_str_with_details (char const *msg,GOErrorInfo *details);
Creates a new GOErrorInfo from msg
and an existing GOErrorInfo
instance to add to the message.
GOErrorInfo * go_error_info_new_str_with_details_list (char const *msg,GSList *details);
Creates a new GOErrorInfo from msg
and a list of existing GOErrorInfo
instances to add to the message.
msg |
error message. |
[nullable] |
details |
a list of GOErrorInfo to add. |
[element-type GOErrorInfo][transfer full][nullable] |
GOErrorInfo * go_error_info_new_vprintf (GOSeverity severity,char const *msg_format,va_list args);
Creates a new GOErrorInfo with the given severity
and a message built
from msg_format
and args
.
severity |
severity of the error, either |
|
msg_format |
printf-style format string for the error message |
|
args |
arguments for |
void
go_error_info_print (GOErrorInfo *error);
Prints error
and all its details to standard error. Messages are prefixed
with E or W according to their severity, and details are indented
below their parent.