mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Display caller location in errors from metamethods.
This commit is contained in:
parent
7840d0b2b0
commit
6290d6f5d0
@ -904,7 +904,8 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o)
|
|||||||
LJ_NOINLINE void lj_err_callermsg(lua_State *L, const char *msg)
|
LJ_NOINLINE void lj_err_callermsg(lua_State *L, const char *msg)
|
||||||
{
|
{
|
||||||
cTValue *frame = L->base-1;
|
cTValue *frame = L->base-1;
|
||||||
cTValue *pframe = frame_islua(frame) ? frame_prevl(frame) : NULL;
|
cTValue *pframe = frame_islua(frame) ? frame_prevl(frame) :
|
||||||
|
frame_iscont(frame) ? frame_prevd(frame) : NULL;
|
||||||
err_loc(L, msg, pframe, frame);
|
err_loc(L, msg, pframe, frame);
|
||||||
lj_err_run(L);
|
lj_err_run(L);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user