| 1350 | |
| 1351 | |
| 1352 | LUA_API_NORETURN int lua_error (lua_State *L) { |
| 1353 | TValue *errobj; |
| 1354 | lua_lock(L); |
| 1355 | errobj = s2v(L->top.p - 1); |
| 1356 | api_checkpop(L, 1); |
| 1357 | /* error object is the memory error message? */ |
| 1358 | if (ttisshrstring(errobj) && eqshrstr(tsvalue(errobj), G(L)->memerrmsg)) |
| 1359 | luaM_error(L); /* raise a memory error */ |
| 1360 | else |
| 1361 | luaG_errormsg(L); /* raise a regular error */ |
| 1362 | /* code unreachable; will unlock when control actually leaves the kernel */ |
| 1363 | } |
| 1364 | |
| 1365 | |
| 1366 | LUA_API int lua_next (lua_State *L, int idx) { |
no test coverage detected