Add exception_t.exception_null to check if no exception

This commit is contained in:
Pradana Aumars 2021-06-02 12:04:36 +02:00
parent 84cf1b0818
commit 72f71d4e2b
2 changed files with 8 additions and 0 deletions

View File

@ -14,3 +14,8 @@ void
exception_free(exception_t *e) {
free(e);
}
int
exception_null(const exception_t *e) {
return e->type == NO_ERROR;
}

View File

@ -21,6 +21,9 @@ exception_init();
void
exception_free(exception_t *e);
int
exception_null(const exception_t *e);
char*
exception_str(exception_t *e);