| 61 | |
| 62 | |
| 63 | static int report (lua_State *L, int status) { |
| 64 | if (status && !lua_isnil(L, -1)) { |
| 65 | const char *msg = lua_tostring(L, -1); |
| 66 | if (msg == NULL) msg = "(error object is not a string)"; |
| 67 | l_message(progname, msg); |
| 68 | lua_pop(L, 1); |
| 69 | } |
| 70 | return status; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | static int traceback (lua_State *L) { |