| 103 | } |
| 104 | |
| 105 | void LuaBaseComponent::uninit() { |
| 106 | if (m_context) { |
| 107 | if (m_context->containsPath("uninit")) { |
| 108 | try { |
| 109 | m_context->invokePath("uninit"); |
| 110 | } catch (LuaException const& e) { |
| 111 | Logger::error("Exception while calling script uninit: {}", outputException(e, true)); |
| 112 | m_error = String(printException(e, false)); |
| 113 | } |
| 114 | } |
| 115 | contextShutdown(); |
| 116 | m_context.reset(); |
| 117 | } |
| 118 | for (auto p : m_threads) { |
| 119 | p.second->stop(); |
| 120 | } |
| 121 | |
| 122 | m_error.reset(); |
| 123 | } |
| 124 | |
| 125 | bool LuaBaseComponent::initialized() const { |
| 126 | return m_context.isValid(); |
nothing calls this directly
no test coverage detected