MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaG_callerror

Function luaG_callerror

third-party/lua-5.5.0/src/ldebug.c:767–773  ·  view source on GitHub ↗

** Raise an error for calling a non-callable object. Try to find a name ** for the object based on how it was called ('funcnamefromcall'); if it ** cannot get a name there, try 'varinfo'. */

Source from the content-addressed store, hash-verified

765** cannot get a name there, try 'varinfo'.
766*/
767l_noret luaG_callerror (lua_State *L, const TValue *o) {
768 CallInfo *ci = L->ci;
769 const char *name = NULL; /* to avoid warnings */
770 const char *kind = funcnamefromcall(L, ci, &name);
771 const char *extra = kind ? formatvarinfo(L, kind, name) : varinfo(L, o);
772 typeerror(L, o, "call", extra);
773}
774
775
776l_noret luaG_forerror (lua_State *L, const TValue *o, const char *what) {

Callers 1

tryfuncTMFunction · 0.70

Calls 4

funcnamefromcallFunction · 0.70
formatvarinfoFunction · 0.70
varinfoFunction · 0.70
typeerrorFunction · 0.70

Tested by

no test coverage detected