Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/lua/ldo.c
| Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | l_noret luaD_throw (lua_State *L, int errcode) { | ||||
| } | } | ||||
| else { /* thread has no error handler */ | else { /* thread has no error handler */ | ||||
| L->status = cast_byte(errcode); /* mark it as dead */ | L->status = cast_byte(errcode); /* mark it as dead */ | ||||
| if (G(L)->mainthread->errorJmp) { /* main thread has a handler? */ | if (G(L)->mainthread->errorJmp) { /* main thread has a handler? */ | ||||
| setobjs2s(L, G(L)->mainthread->top++, L->top - 1); /* copy error obj. */ | setobjs2s(L, G(L)->mainthread->top++, L->top - 1); /* copy error obj. */ | ||||
| luaD_throw(G(L)->mainthread, errcode); /* re-throw in main thread */ | luaD_throw(G(L)->mainthread, errcode); /* re-throw in main thread */ | ||||
| } | } | ||||
| else { /* no handler at all; abort */ | else { /* no handler at all; abort */ | ||||
| if (G(L)->panic) { /* panic function? */ | if (G(L)->on_panic) { /* panic function? */ | ||||
| lua_unlock(L); | lua_unlock(L); | ||||
| G(L)->panic(L); /* call it (last chance to jump out) */ | G(L)->on_panic(L); /* call it (last chance to jump out) */ | ||||
| } | } | ||||
| panic("no error handler"); | panic("no error handler"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #if defined(__GNUC__) && !defined(__clang__) && \ | #if defined(__GNUC__) && !defined(__clang__) && \ | ||||
| defined(HAVE_INFINITE_RECURSION) | defined(HAVE_INFINITE_RECURSION) | ||||
| ▲ Show 20 Lines • Show All 559 Lines • Show Last 20 Lines | |||||