MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / lua_error

Function lua_error

xrepo/packages/l/lua/port/lua/src/lapi.c:1241–1253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1239
1240
1241LUA_API int lua_error (lua_State *L) {
1242 TValue *errobj;
1243 lua_lock(L);
1244 errobj = s2v(L->top - 1);
1245 api_checknelems(L, 1);
1246 /* error object is the memory error message? */
1247 if (ttisshrstring(errobj) && eqshrstr(tsvalue(errobj), G(L)->memerrmsg))
1248 luaM_error(L); /* raise a memory error */
1249 else
1250 luaG_errormsg(L); /* raise a regular error */
1251 /* code unreachable; will unlock when control actually leaves the kernel */
1252 return 0; /* to avoid warnings */
1253}
1254
1255
1256LUA_API int lua_next (lua_State *L, int idx) {

Callers 5

luaB_errorFunction · 0.70
luaB_dofileFunction · 0.70
luaL_errorFunction · 0.70
resizeboxFunction · 0.70
luaB_auxwrapFunction · 0.70

Calls 1

luaG_errormsgFunction · 0.85

Tested by

no test coverage detected