Clean up error definitions, location and expose them in the headers
- Exposes all errors in the header file so any user of the api can test for the specific error conditions - Mark all static error pointers as const - Move generic errors into error.h - Name all errors err_modulename_* for errors that belong to a specific module and err_* for generic errors.
This commit is contained in:
@ -5,7 +5,10 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern error_t *err_eof;
|
||||
extern error_t *const err_lexer_already_open;
|
||||
extern error_t *const err_prefix_too_large;
|
||||
extern error_t *const err_buffer_underrun;
|
||||
extern error_t *const err_consume_excessive_length;
|
||||
|
||||
typedef enum {
|
||||
TOKEN_ERROR,
|
||||
|
Reference in New Issue
Block a user