| 8136 | } // namespace detail |
| 8137 | |
| 8138 | inline void set_default_exception_handler(lua_State* L, exception_handler_function exf = &detail::default_exception_handler) { |
| 8139 | static_assert(sizeof(void*) >= sizeof(exception_handler_function), |
| 8140 | "void* storage is too small to transport the exception handler: please file a bug on the sol2 issue tracker to get this looked at!"); |
| 8141 | void* storage; |
| 8142 | std::memcpy(&storage, &exf, sizeof(exception_handler_function)); |
| 8143 | lua_pushlightuserdata(L, storage); |
| 8144 | lua_setglobal(L, detail::default_exception_handler_name()); |
| 8145 | } |
| 8146 | } // namespace sol |
| 8147 | |
| 8148 | // end of sol/trampoline.hpp |
no outgoing calls
no test coverage detected