GEL  0.99
error.h File Reference
#include <gel/common.h>

Go to the source code of this file.

Macros

#define GEL_ESUCCESS   0
 
#define GEL_EIO   2
 
#define GEL_EFORMAT   4
 
#define GEL_ENOTSUPP   6
 
#define GEL_ENOTFOUND   8
 
#define GEL_ENOTLOADED   10
 
#define GEL_EINVAL   12
 
#define GEL_ERESOURCE   14
 
#define GEL_EDEPEND   16
 
#define GEL_ESTACK   18
 
#define GEL_EMAX   18
 
#define GEL_WDYNAMIC   1
 
#define GEL_WNONFATAL   3
 
#define GEL_WMAX   3
 
#define GEL_IS_WARNING   (gel_errno & 1)
 
#define GEL_IS_ERROR   (!(gel_errno & 1))
 
#define GEL_ERRNO   (gel_errno >> 1)
 

Typedefs

typedef void() gel_error_fun_t(int code, const char *msg)
 

Functions

const char * gel_strerror (void)
 
gel_error_fun_tgel_set_error_fun (gel_error_fun_t *fun)
 
void gel_set_error (int code, const char *fmt,...)
 

Variables

int gel_errno
 

Macro Definition Documentation

◆ GEL_EINVAL

#define GEL_EINVAL   12

◆ GEL_EMAX

#define GEL_EMAX   18

◆ GEL_ERESOURCE

#define GEL_ERESOURCE   14

◆ GEL_ESTACK

#define GEL_ESTACK   18

◆ GEL_WMAX

#define GEL_WMAX   3

Typedef Documentation

◆ gel_error_fun_t

typedef void() gel_error_fun_t(int code, const char *msg)

Function Documentation

◆ gel_set_error()

void gel_set_error ( int  code,
const char *  fmt,
  ... 
)

Generate an error using new error function system.

Parameters
codeError code.
fmtMessage format.
...Format arguments.

◆ gel_set_error_fun()

gel_error_fun_t* gel_set_error_fun ( gel_error_fun_t fun)

Set the function which will be called when an error or a warning arise.

Parameters
funNew error function.
Returns
Old error function.