diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-29 13:15:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-29 13:15:54 -0300 |
commit | 4bd10b6fe81c0a56eb9e01e24fba10e655966870 (patch) | |
tree | ff21703d9f06a0dd4ca4f3317dd0cb7b048c9b8d /ldebug.h | |
parent | 59e565d9555c07e82808d8c1db8f4f4d159b5e5c (diff) | |
download | lua-4bd10b6fe81c0a56eb9e01e24fba10e655966870.tar.gz lua-4bd10b6fe81c0a56eb9e01e24fba10e655966870.tar.bz2 lua-4bd10b6fe81c0a56eb9e01e24fba10e655966870.zip |
Better error messages for calling non-callable objects
When available, use the calling code to find a suitable name for what
was being called; this is particularly useful for errors of non-callable
metamethods. This commit also improved the debug information for
order metamethods.
Diffstat (limited to 'ldebug.h')
-rw-r--r-- | ldebug.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -31,6 +31,7 @@ LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n, | |||
31 | StkId *pos); | 31 | StkId *pos); |
32 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, | 32 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, |
33 | const char *opname); | 33 | const char *opname); |
34 | LUAI_FUNC l_noret luaG_callerror (lua_State *L, const TValue *o); | ||
34 | LUAI_FUNC l_noret luaG_forerror (lua_State *L, const TValue *o, | 35 | LUAI_FUNC l_noret luaG_forerror (lua_State *L, const TValue *o, |
35 | const char *what); | 36 | const char *what); |
36 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, | 37 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, |