]> git.lizzy.rs Git - nothing.git/blob - src/error.h
Merge pull request #34 from tsoding/31-unified-error-handling
[nothing.git] / src / error.h
1 #ifndef ERROR_H_
2 #define ERROR_H_
3
4 typedef enum error_type_t {
5     ERROR_TYPE_OK = 0,
6     ERROR_TYPE_LIBC,
7     ERROR_TYPE_SDL2,
8
9     ERROR_TYPE_N
10 } error_type_t;
11
12 error_type_t current_error(void);
13 void throw_error(error_type_t error_type);
14 void reset_error(void);
15 void print_current_error_msg(const char *user_prefix);
16 void print_error_msg(error_type_t error_type, const char *user_prefix);
17
18 #endif  // ERROR_H_