|
@@ -120,6 +120,7 @@ l_noret luaD_throw (lua_State *L, int errcode) {
|
|
|
else { /* thread has no error handler */
|
|
|
global_State *g = G(L);
|
|
|
errcode = luaE_resetthread(L, errcode); /* close all upvalues */
|
|
|
+ L->status = errcode;
|
|
|
if (g->mainthread->errorJmp) { /* main thread has a handler? */
|
|
|
setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */
|
|
|
luaD_throw(g->mainthread, errcode); /* re-throw in main thread */
|