** 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). */
| 953 | ** find a recover point). |
| 954 | */ |
| 955 | static 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 | |
| 966 | LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs, |
no test coverage detected