#ifndef EXCEPTION_H #define EXCEPTION_H typedef enum exception_type { NO_ERROR, // or NULL NO_FILE, XML_FILE_MISSING, XML_READ_FILE_FAIL, MD5SUM_GEN_FAIL, MD5SUM_VERIFY_FAIL } exception_type; typedef struct exception_t { exception_type type; char *msg; } exception_t; exception_t* exception_init(); void exception_free(exception_t *e); int exception_null(const exception_t *e); char* exception_str(const exception_t *e, char* msg); #endif