MCPcopy Create free account
hub / github.com/ThePhD/sol2 / get_error_handler

Method get_error_handler

include/sol/protected_function.hpp:279–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 }
278
279 auto get_error_handler() const noexcept {
280 if constexpr (is_stateless_lua_reference_v<handler_t>) {
281 if constexpr (is_stack_based_v<handler_t>) {
282 return stack_reference(lua_state(), m_error_handler.stack_index());
283 }
284 else {
285 return basic_reference<is_main_threaded_v<base_t>>(lua_state(), ref_index(m_error_handler.registry_index()));
286 }
287 }
288 else {
289 return m_error_handler;
290 }
291 }
292
293 template <typename ErrorHandler_>
294 void set_error_handler(ErrorHandler_&& error_handler_) noexcept {

Callers

nothing calls this directly

Calls 4

ref_indexClass · 0.85
stack_referenceClass · 0.70
stack_indexMethod · 0.45
registry_indexMethod · 0.45

Tested by

no test coverage detected