improved errors
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
#ifndef ERRORS_H
|
||||
#define ERRORS_H
|
||||
|
||||
#include "../libft/includes/libft.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ERROR_BASIC = 0,
|
||||
ERROR_UNKNOWN_TOKEN = -1,
|
||||
ERROR_NUMBER_TOO_BIG = -2,
|
||||
ERROR_PARSING = -3,
|
||||
ERROR_TOKEN_POSITION = -4,
|
||||
ERROR_BASE = 1, // Start at 1 to avoid exit(0) for errors
|
||||
ERROR_UNKNOWN_TOKEN,
|
||||
ERROR_NUMBER_TOO_BIG,
|
||||
ERROR_PARSING,
|
||||
ERROR_TOKEN_POSITION,
|
||||
ERROR_VAR_DIFF,
|
||||
ERROR_SENTINEL,
|
||||
} program_error;
|
||||
|
||||
int stop_errors(program_error err, const char *details);
|
||||
int stop_errors(program_error err, const char *format, ...);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user