#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <glib.h>
#include <common/gfal_constants.h>
Go to the source code of this file.
Defines | |
#define | g_return_val_err_if_fail(exp, val, err, msg) if(!(exp)){ g_set_error(err,0,EINVAL,msg); return val; } |
#define | G_RETURN_ERR(ret, tmp_err, err) |
Functions | |
void | gfal_print_verbose (int verbose_lvl, const char *msg,...) |
display a verbose message | |
int | gfal_set_verbose (int value) |
set the verbose mode for the current program | |
int | gfal_get_verbose () |
return verbose mode level | |
void | gfal_release_GError (GError **err) |
display the full GError message on stderr and free the memory associated | |
gboolean | gfal_check_GError (GError **err) |
convenient way to manage Gerror If error does not exist, just return FALSE else print error on stderr, clear it and return TRUE | |
char * | gfal_str_GError (GError **err) |
char * | gfal_str_GError_r (GError **err, char *buff_err, size_t s_err) |
Variables | |
const char * | no_err |
#define G_RETURN_ERR | ( | ret, | |||
tmp_err, | |||||
err | ) |
Value:
if(tmp_err)\ g_propagate_prefixed_error(err, tmp_err, "[%s]", __func__);\ return ret
void gfal_print_verbose | ( | int | verbose_lvl, | |
const char * | msg, | |||
... | ||||
) |
display a verbose message
msg is displayed if current verbose level is superior to verbose mode specified
int gfal_set_verbose | ( | int | value | ) |
set the verbose mode for the current program
set the verbose level of gfal 2
char* gfal_str_GError | ( | GError ** | err | ) |
return a valid string of the current error,
: like strerror, not thread safe.
char* gfal_str_GError_r | ( | GError ** | err, | |
char * | buff_err, | |||
size_t | s_err | |||
) |
set buff_err to the current gfal error, reentrant function