MCPcopy Create free account
hub / github.com/DFHack/dfhack / errorlimit

Function errorlimit

depends/lua/src/lparser.c:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79static l_noret errorlimit (FuncState *fs, int limit, const char *what) {
80 lua_State *L = fs->ls->L;
81 const char *msg;
82 int line = fs->f->linedefined;
83 const char *where = (line == 0)
84 ? "main function"
85 : luaO_pushfstring(L, "function at line %d", line);
86 msg = luaO_pushfstring(L, "too many %s (limit is %d) in %s",
87 what, limit, where);
88 luaX_syntaxerror(fs->ls, msg);
89}
90
91
92static void checklimit (FuncState *fs, int v, int l, const char *what) {

Callers 1

checklimitFunction · 0.85

Calls 2

luaO_pushfstringFunction · 0.85
luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected