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

Function luaG_callerror

third-party/lua-5.4.6/src/ldebug.c:772–778  ·  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

770** cannot get a name there, try 'varinfo'.
771*/
772l_noret luaG_callerror (lua_State *L, const TValue *o) {
773 CallInfo *ci = L->ci;
774 const char *name = NULL; /* to avoid warnings */
775 const char *kind = funcnamefromcall(L, ci, &name);
776 const char *extra = kind ? formatvarinfo(L, kind, name) : varinfo(L, o);
777 typeerror(L, o, "call", extra);
778}
779
780
781l_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