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