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

Function errfile

third-party/lua-5.4.6/src/lauxlib.c:737–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735
736
737static int errfile (lua_State *L, const char *what, int fnameindex) {
738 int err = errno;
739 const char *filename = lua_tostring(L, fnameindex) + 1;
740 if (err != 0)
741 lua_pushfstring(L, "cannot %s %s: %s", what, filename, strerror(err));
742 else
743 lua_pushfstring(L, "cannot %s %s", what, filename);
744 lua_remove(L, fnameindex);
745 return LUA_ERRFILE;
746}
747
748
749/*

Callers 1

luaL_loadfilexFunction · 0.70

Calls 2

lua_pushfstringFunction · 0.70
lua_removeFunction · 0.50

Tested by

no test coverage detected