ccm/lib/err.h

24 lines
387 B
C
Raw Permalink Normal View History

2024-03-18 17:20:40 +00:00
#ifndef CCM_ERR_H
#define CCM_ERR_H
#include "commons.h"
#include "vec.h"
typedef struct {
int line;
char msg[CCM_STRLEN];
} err_log_t;
typedef struct {
vec_t logs;
} err_t;
void err_init(err_t* self);
void err_free(err_t* self);
int err_is_ok(err_t* self);
void err_push(err_t* self, int line, char const* format, ...);
void err_print_stack_trace(err_t* self);
#endif