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.
2021-05-15 19:18:42 +02:00
|
|
|
#ifndef EXCEPTION_H
|
|
|
|
#define EXCEPTION_H
|
|
|
|
|
|
|
|
typedef enum exception_type {
|
|
|
|
NO_ERROR, // or NULL
|
|
|
|
NO_FILE,
|
|
|
|
XML_FILE_MISSING,
|
|
|
|
XML_READ_FILE_FAIL,
|
2021-06-01 00:07:32 +02:00
|
|
|
MD5SUM_GEN_FAIL,
|
2021-05-15 19:18:42 +02:00
|
|
|
MD5SUM_VERIFY_FAIL
|
|
|
|
} exception_type;
|
|
|
|
|
|
|
|
typedef struct exception_t {
|
|
|
|
exception_type type;
|
|
|
|
char *msg;
|
|
|
|
} exception_t;
|
|
|
|
|
2021-06-01 00:58:30 +02:00
|
|
|
exception_t*
|
|
|
|
exception_init();
|
|
|
|
|
|
|
|
void
|
|
|
|
exception_free(exception_t *e);
|
|
|
|
|
2021-06-02 12:04:36 +02:00
|
|
|
int
|
|
|
|
exception_null(const exception_t *e);
|
|
|
|
|
2021-05-15 19:18:42 +02:00
|
|
|
char*
|
2021-06-12 11:04:02 +02:00
|
|
|
exception_str(const exception_t *e, char* msg);
|
2021-05-15 19:18:42 +02:00
|
|
|
|
|
|
|
#endif
|