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

Function errfile

third-party/lua-5.5.0/src/lauxlib.c:761–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759
760
761static int errfile (lua_State *L, const char *what, int fnameindex) {
762 int err = errno;
763 const char *filename = lua_tostring(L, fnameindex) + 1;
764 if (err != 0)
765 lua_pushfstring(L, "cannot %s %s: %s", what, filename, strerror(err));
766 else
767 lua_pushfstring(L, "cannot %s %s", what, filename);
768 lua_remove(L, fnameindex);
769 return LUA_ERRFILE;
770}
771
772
773/*

Callers 1

luaL_loadfilexFunction · 0.70

Calls 2

lua_pushfstringFunction · 0.70
lua_removeFunction · 0.50

Tested by

no test coverage detected