| 19 | } |
| 20 | |
| 21 | void LuaHandler::ExecuteScript(const std::string& luaFilename, bool isOptional) |
| 22 | { |
| 23 | if (isOptional && !std::filesystem::is_regular_file(luaFilename)) |
| 24 | return; |
| 25 | |
| 26 | auto result = _lua->safe_script_file(luaFilename, sol::script_pass_on_error); |
| 27 | if (!result.valid()) |
| 28 | { |
| 29 | sol::error error = result; |
| 30 | throw TENScriptException{ error.what() }; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | void LuaHandler::ExecuteString(const std::string& command) |
| 35 | { |
no test coverage detected