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.c

22 lines
323 B
C

#include <stdlib.h>
#include "exception_t.h"
exception_t*
exception_init() {
exception_t *e = (exception_t*) malloc(sizeof(exception_t));
e->type = NO_ERROR;
e->msg = NULL;
return e;
}
void
exception_free(exception_t *e) {
free(e);
}
int
exception_null(const exception_t *e) {
return e->type == NO_ERROR;
}