| 158 | |
| 159 | |
| 160 | static int traceback (lua_State *L) { |
| 161 | const char *msg = lua_tostring(L, 1); |
| 162 | if (msg) |
| 163 | luaL_traceback(L, L, msg, 1); |
| 164 | else if (!lua_isnoneornil(L, 1)) { /* is there an error object? */ |
| 165 | if (!luaL_callmeta(L, 1, "__tostring")) /* try its 'tostring' metamethod */ |
| 166 | lua_pushliteral(L, "(no error message)"); |
| 167 | } |
| 168 | return 1; |
| 169 | } |
| 170 | |
| 171 | |
| 172 | static int docall (lua_State *L, int narg, int nres) { |
nothing calls this directly
no test coverage detected