Melee Modding Library
2.0.0
A C library for modding Super Smash Bros Melee
Main Page
Modules
Data Structures
Files
Examples
File List
Globals
src
error.h
Go to the documentation of this file.
1
6
#ifndef MML_ERROR_H
7
#define MML_ERROR_H
8
9
#include "
print.h
"
10
12
#define STRINGIFY(x) #x
13
#define TOSTRING(x) STRINGIFY(x)
14
17
#define THROW_ERROR(code, msg) \
18
do { \
19
_errorState = _errorState | code; \
20
error(__FILE__ ":" TOSTRING(__LINE__) ": " msg); \
21
} while (0)
22
24
#define ERROR_MSG(msg) error(__FILE__ ":" TOSTRING(__LINE__) \
25
": " msg)
26
28
#define ERROR_STATE _errorState;
29
31
#define ERROR_THROWN(code) (_errorState & (code))
32
34
35
#define ERR_1 (1 << 0)
36
#define ERR_2 (1 << 1)
37
#define ERR_3 (1 << 2)
38
#define ERR_4 (1 << 3)
39
#define ERR_5 (1 << 4)
40
#define ERR_6 (1 << 5)
41
#define ERR_7 (1 << 6)
42
#define ERR_8 (1 << 7)
43
#define ERR_9 (1 << 8)
44
#define ERR_10 (1 << 9)
45
#define ERR_11 (1 << 10)
46
#define ERR_12 (1 << 11)
47
#define ERR_13 (1 << 12)
48
#define ERR_14 (1 << 13)
49
#define ERR_15 (1 << 14)
50
#define ERR_16 (1 << 15)
51
#define ERR_17 (1 << 16)
52
#define ERR_18 (1 << 17)
53
#define ERR_19 (1 << 18)
54
#define ERR_20 (1 << 19)
55
#define ERR_21 (1 << 20)
56
#define ERR_22 (1 << 21)
57
#define ERR_23 (1 << 22)
58
#define ERR_24 (1 << 23)
59
#define ERR_25 (1 << 24)
60
#define ERR_26 (1 << 25)
61
#define ERR_27 (1 << 26)
62
#define ERR_28 (1 << 27)
63
#define ERR_29 (1 << 28)
64
#define ERR_30 (1 << 29)
65
#define ERR_31 (1 << 30)
66
#define ERR_32 (1 << 31)
67
68
70
extern
u32
_errorState
;
71
72
#endif
_errorState
u32 _errorState
Definition:
error.c:3
print.h
Print output.
u32
uint32_t u32
Definition:
gctypes.h:16
Generated by
1.8.11