diff options
Diffstat (limited to 'src/lj_errmsg.h')
-rw-r--r-- | src/lj_errmsg.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/lj_errmsg.h b/src/lj_errmsg.h index 2c26a4f1..2e5c776a 100644 --- a/src/lj_errmsg.h +++ b/src/lj_errmsg.h | |||
@@ -67,6 +67,7 @@ ERRDEF(PROTMT, "cannot change a protected metatable") | |||
67 | ERRDEF(UNPACK, "too many results to unpack") | 67 | ERRDEF(UNPACK, "too many results to unpack") |
68 | ERRDEF(RDRSTR, "reader function must return a string") | 68 | ERRDEF(RDRSTR, "reader function must return a string") |
69 | ERRDEF(PRTOSTR, LUA_QL("tostring") " must return a string to " LUA_QL("print")) | 69 | ERRDEF(PRTOSTR, LUA_QL("tostring") " must return a string to " LUA_QL("print")) |
70 | ERRDEF(NUMRNG, "number out of range") | ||
70 | ERRDEF(IDXRNG, "index out of range") | 71 | ERRDEF(IDXRNG, "index out of range") |
71 | ERRDEF(BASERNG, "base out of range") | 72 | ERRDEF(BASERNG, "base out of range") |
72 | ERRDEF(LVLRNG, "level out of range") | 73 | ERRDEF(LVLRNG, "level out of range") |
@@ -96,18 +97,12 @@ ERRDEF(STRPATX, "pattern too complex") | |||
96 | ERRDEF(STRCAPI, "invalid capture index") | 97 | ERRDEF(STRCAPI, "invalid capture index") |
97 | ERRDEF(STRCAPN, "too many captures") | 98 | ERRDEF(STRCAPN, "too many captures") |
98 | ERRDEF(STRCAPU, "unfinished capture") | 99 | ERRDEF(STRCAPU, "unfinished capture") |
99 | ERRDEF(STRFMTO, "invalid option " LUA_QL("%%%c") " to " LUA_QL("format")) | 100 | ERRDEF(STRFMT, "invalid option " LUA_QS " to " LUA_QL("format")) |
100 | ERRDEF(STRFMTR, "invalid format (repeated flags)") | ||
101 | ERRDEF(STRFMTW, "invalid format (width or precision too long)") | ||
102 | ERRDEF(STRGSRV, "invalid replacement value (a %s)") | 101 | ERRDEF(STRGSRV, "invalid replacement value (a %s)") |
103 | ERRDEF(BADMODN, "name conflict for module " LUA_QS) | 102 | ERRDEF(BADMODN, "name conflict for module " LUA_QS) |
104 | #if LJ_HASJIT | 103 | #if LJ_HASJIT |
105 | ERRDEF(JITPROT, "runtime code generation failed, restricted kernel?") | 104 | ERRDEF(JITPROT, "runtime code generation failed, restricted kernel?") |
106 | #if LJ_TARGET_X86ORX64 | ||
107 | ERRDEF(NOJIT, "JIT compiler disabled, CPU does not support SSE2") | ||
108 | #else | ||
109 | ERRDEF(NOJIT, "JIT compiler disabled") | 105 | ERRDEF(NOJIT, "JIT compiler disabled") |
110 | #endif | ||
111 | #elif defined(LJ_ARCH_NOJIT) | 106 | #elif defined(LJ_ARCH_NOJIT) |
112 | ERRDEF(NOJIT, "no JIT compiler for this architecture (yet)") | 107 | ERRDEF(NOJIT, "no JIT compiler for this architecture (yet)") |
113 | #else | 108 | #else |
@@ -118,7 +113,6 @@ ERRDEF(JITOPT, "unknown or malformed optimization flag " LUA_QS) | |||
118 | /* Lexer/parser errors. */ | 113 | /* Lexer/parser errors. */ |
119 | ERRDEF(XMODE, "attempt to load chunk with wrong mode") | 114 | ERRDEF(XMODE, "attempt to load chunk with wrong mode") |
120 | ERRDEF(XNEAR, "%s near " LUA_QS) | 115 | ERRDEF(XNEAR, "%s near " LUA_QS) |
121 | ERRDEF(XELEM, "lexical element too long") | ||
122 | ERRDEF(XLINES, "chunk has too many lines") | 116 | ERRDEF(XLINES, "chunk has too many lines") |
123 | ERRDEF(XLEVELS, "chunk has too many syntax levels") | 117 | ERRDEF(XLEVELS, "chunk has too many syntax levels") |
124 | ERRDEF(XNUMBER, "malformed number") | 118 | ERRDEF(XNUMBER, "malformed number") |
@@ -186,6 +180,19 @@ ERRDEF(FFI_NYIPACKBIT, "NYI: packed bit fields") | |||
186 | ERRDEF(FFI_NYICALL, "NYI: cannot call this C function (yet)") | 180 | ERRDEF(FFI_NYICALL, "NYI: cannot call this C function (yet)") |
187 | #endif | 181 | #endif |
188 | 182 | ||
183 | #if LJ_HASBUFFER | ||
184 | /* String buffer errors. */ | ||
185 | ERRDEF(BUFFER_SELF, "cannot put buffer into itself") | ||
186 | ERRDEF(BUFFER_BADOPT, "bad options table") | ||
187 | ERRDEF(BUFFER_BADENC, "cannot serialize " LUA_QS) | ||
188 | ERRDEF(BUFFER_BADDEC, "cannot deserialize tag 0x%02x") | ||
189 | ERRDEF(BUFFER_BADDICTX, "cannot deserialize dictionary index %d") | ||
190 | ERRDEF(BUFFER_DEPTH, "too deep to serialize") | ||
191 | ERRDEF(BUFFER_DUPKEY, "duplicate table key") | ||
192 | ERRDEF(BUFFER_EOB, "unexpected end of buffer") | ||
193 | ERRDEF(BUFFER_LEFTOV, "left-over data in buffer") | ||
194 | #endif | ||
195 | |||
189 | #undef ERRDEF | 196 | #undef ERRDEF |
190 | 197 | ||
191 | /* Detecting unused error messages: | 198 | /* Detecting unused error messages: |