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

Function precover

third-party/lua-5.5.0/src/ldo.c:955–963  ·  view source on GitHub ↗

** Unrolls a coroutine in protected mode while there are recoverable ** errors, that is, errors inside a protected call. (Any error ** interrupts 'unroll', and this loop protects it again so it can ** continue.) Stops with a normal end (status == LUA_OK), an yield ** (status == LUA_YIELD), or an unprotected error ('findpcall' doesn't ** find a recover point). */

Source from the content-addressed store, hash-verified

953** find a recover point).
954*/
955static TStatus precover (lua_State *L, TStatus status) {
956 CallInfo *ci;
957 while (errorstatus(status) && (ci = findpcall(L)) != NULL) {
958 L->ci = ci; /* go down to recovery functions */
959 setcistrecst(ci, status); /* status to finish 'pcall' */
960 status = luaD_rawrunprotected(L, unroll, NULL);
961 }
962 return status;
963}
964
965
966LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs,

Callers 1

lua_resumeFunction · 0.70

Calls 2

findpcallFunction · 0.70
luaD_rawrunprotectedFunction · 0.70

Tested by

no test coverage detected