diff options
Diffstat (limited to 'src/common/error.h')
-rw-r--r-- | src/common/error.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/common/error.h b/src/common/error.h index 17843ed..f2845df 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -11,9 +11,20 @@ #include <stddef.h> +// error handling is centralized here for the sake of simplicity :/ +typedef enum { + + // errors for src/blogc + BLOGC_ERROR_SOURCE_PARSER = 100, + BLOGC_ERROR_TEMPLATE_PARSER, + BLOGC_ERROR_LOADER, + BLOGC_ERROR_FILE, + BLOGC_WARNING_DATETIME_PARSER, +} bc_error_type_t; + typedef struct { char *msg; - int type; + bc_error_type_t type; } bc_error_t; bc_error_t* bc_error_new(int type, const char *msg); |