diff --git a/src/exception_t.c b/src/exception_t.c index da8cbaf..b5cea82 100644 --- a/src/exception_t.c +++ b/src/exception_t.c @@ -14,3 +14,8 @@ void exception_free(exception_t *e) { free(e); } + +int +exception_null(const exception_t *e) { + return e->type == NO_ERROR; +} diff --git a/src/exception_t.h b/src/exception_t.h index ba6af43..5be2cb7 100644 --- a/src/exception_t.h +++ b/src/exception_t.h @@ -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);