mdcore  0.1.5
Defines | Functions | Variables
/home/pedro/work/mdcore/src/errs.h File Reference

Go to the source code of this file.

Defines

#define errs_maxstack   100
#define errs_err_ok   0
#define errs_err_io   -1

Functions

int errs_register (int id, const char *msg, int line, const char *func, char *file)
 Dump an error onto the stack.
int errs_dump (FILE *out)
 Print the error stack out to the given FILE pointer.
void errs_clear ()
 Re-set the error stack.

Variables

int errs_err
const char * errs_err_msg []

Define Documentation

#define errs_err_io   -1
#define errs_err_ok   0
#define errs_maxstack   100

Function Documentation

void errs_clear ( )

Re-set the error stack.

int errs_dump ( FILE *  out)

Print the error stack out to the given FILE pointer.

Parameters:
outA pointer to a FILE structure.
Returns:
errs_err_ok or < 0 on failure.
int errs_register ( int  id,
const char *  msg,
int  line,
const char *  func,
char *  file 
)

Dump an error onto the stack.

Parameters:
idAn error identifier that will be returned.
msgA pointer to a string containing a descriptive error message.
lineThe line on which the error occured.
funcThe name of the function in which the error occured.
fileThe name of the file in which the error occured.
Returns:
The value of id.

Variable Documentation

int errs_err
const char* errs_err_msg[]
 All Data Structures Files Functions Variables Typedefs Enumerator Defines