| 241 | } |
| 242 | |
| 243 | void handleLuaError(lua_State *L, LogLevel level) |
| 244 | { |
| 245 | size_t count; |
| 246 | const char *buf = luaL_checklstring(L, -1, &count); |
| 247 | UString str{buf, count}; |
| 248 | // TODO: unwind stack and show previously called c function? |
| 249 | Log(level, LOGGER_PREFIX, "Lua: " + str); |
| 250 | lua_pop(L, 1); // pop error object we just printed |
| 251 | } |
| 252 | |
| 253 | void pushLuaFramework(lua_State *L) |
| 254 | { |
no test coverage detected