| 207 | |
| 208 | template <typename Ret> |
| 209 | Maybe<LuaValue> LuaBaseComponent::eval(String const& code) { |
| 210 | if (!checkInitialization()) |
| 211 | return {}; |
| 212 | |
| 213 | try { |
| 214 | return m_context->eval<Ret>(code); |
| 215 | } catch (LuaException const& e) { |
| 216 | Logger::error("Exception while evaluating lua in context: {}", outputException(e, true)); |
| 217 | return {}; |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | template <typename Base> |
| 222 | JsonObject LuaStorableComponent<Base>::getScriptStorage() const { |
no test coverage detected