| Top |
| lt_error_t * | lt_error_new () |
| lt_error_t * | lt_error_ref () |
| void | lt_error_unref () |
| lt_error_t * | lt_error_set () |
| void | lt_error_clear () |
| lt_bool_t | lt_error_is_set () |
| void | lt_error_print () |
lt_error_t *
lt_error_new (void);
Creates lt_error_t object. this function is protected and not supposed
to use in applications directly. Use lt_error_set().
lt_error_t *
lt_error_ref (lt_error_t *error);
Inscreases the reference count of error
.
void
lt_error_unref (lt_error_t *error);
Decreases the reference count of error
. when its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
lt_error_t * lt_error_set (lt_error_t **error,lt_error_type_t type,const char *message);
Sets the error into error
according to the given parameters.
error |
a return location for a lt_error_t |
|
type |
||
message |
the string format to output the error messages |
|
... |
the parameters to insert into the format string |
lt_bool_t lt_error_is_set (lt_error_t *error,lt_error_type_t type);
Checks if error
contains type
of errors. if LT_ERR_ANY is set to type
,
all the types of the errors are targeted. otherwise the result is filtered
out by type
.
void lt_error_print (lt_error_t *error,lt_error_type_t type);
Output the error messages in error
according to type
.
Error code used in this library.
typedef struct _lt_error_t lt_error_t;
All the fields in the lt_error_t structure are private to the lt_error_t implementation.