| 212 | } |
| 213 | |
| 214 | void print_error(lua_State *state) noexcept { |
| 215 | std::string error = lua_tostring(state, -1); |
| 216 | std::stringstream ss(error); |
| 217 | std::string line; |
| 218 | while(std::getline(ss, line, '\n')) { |
| 219 | console_error(line.c_str()); |
| 220 | } |
| 221 | lua_pop(state, 1); |
| 222 | } |
| 223 | |
| 224 | LuaScript::LuaScript(lua_State *state, const char *name, const bool &global, const bool &sandbox) noexcept : state(state), name(name), sandbox(sandbox), global(global) {} |
| 225 |
no test coverage detected