This repository has been archived on 2021-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
modetw/src/exception_t.h

31 lines
462 B
C

#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