24 lines
387 B
C
24 lines
387 B
C
#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
|