spkgdeveloper's documentation

Error Handling API


Detailed Description

This is common error handling API for all parts of spkg.


Defines

#define E_OK   0
 all ok
#define E_ERROR   1
 nonfatal error
#define E_BADARG   2
 invalid function arguments
#define E_FATAL   4
 fatal error
#define E_BREAK   5
 terminated by signal
#define E_PASS   0xffffffff
 leave previous error code (useful for longjmp error handling)
#define E(n)   (1<<(n+8))
 helper macro for error number definitions

Functions

error * e_new ()
 Create new error object.
void e_free (struct error *e)
 Free error object.
gchar * e_string (struct error *e)
 Get string representation of the error.
gint e_errno (struct error *e)
 Get numeric representation of the error.
void e_add (struct error *e, const char *context, const char *function, gint errnum, gchar *errfmt,...) G_GNUC_PRINTF(5
 Add error to the error object.
void void e_clean (struct error *e)
 Clean error.
void e_print (struct error *e)
 Print error message.
gint e_ok (struct error *e)
 Returns true if no error occured.

Documentation for spkg, Sun Jul 23 13:12:53 2006.