| 90 | }; |
| 91 | |
| 92 | static std::string geterrorobjstr(lua_State *L, int errcode) |
| 93 | { |
| 94 | switch (errcode) { |
| 95 | case LUA_ERRMEM: { /* memory error? */ |
| 96 | return "memory error"; |
| 97 | } |
| 98 | case LUA_ERRERR: { |
| 99 | return "error in error handling"; |
| 100 | } |
| 101 | default: { |
| 102 | return lua_tolstring(L, -1, nullptr); |
| 103 | // setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | } |
| 108 | |
| 109 | |
| 110 | static void seterrorobj(lua_State *L, int errcode, StkId oldtop) { |
no test coverage detected