MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaG_callerror

Function luaG_callerror

src/ldebug.cpp:785–791  ·  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

783** cannot get a name there, try 'varinfo'.
784*/
785l_noret luaG_callerror (lua_State *L, const TValue *o) {
786 CallInfo *ci = L->ci;
787 const char *name = NULL; /* to avoid warnings */
788 const char *kind = funcnamefromcall(L, ci, &name);
789 const char *extra = kind ? formatvarinfo(L, kind, name) : varinfo(L, o);
790 typeerror(L, o, "call", extra);
791}
792
793
794l_noret luaG_forerror (lua_State *L, const TValue *o, const char *what) {

Callers 1

tryfuncTMFunction · 0.85

Calls 4

funcnamefromcallFunction · 0.85
formatvarinfoFunction · 0.85
varinfoFunction · 0.85
typeerrorFunction · 0.85

Tested by

no test coverage detected