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-06-01 00:58:30 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2021-05-15 19:18:42 +02:00
|
|
|
#include "exception_t.h"
|
2021-06-01 00:58:30 +02:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2021-06-02 12:04:36 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
exception_null(const exception_t *e) {
|
|
|
|
return e->type == NO_ERROR;
|
|
|
|
}
|