0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 08:58:20 +02:00

ircd:Ⓜ️:init::modules: Call dtor to properly unload on init error.

This commit is contained in:
Jason Volk 2019-06-04 18:00:39 -07:00
parent dd4f133530
commit 6b467733a8

View file

@ -110,7 +110,7 @@ catch(const m::error &e)
log, "%s %s", what, content
};
mods::imports.clear();
this->~modules();
throw m::error
{
"M_INIT_ERROR", "Failed to start :%s :%s", what, content
@ -125,7 +125,7 @@ catch(const std::exception &e)
log, "%s", what
};
mods::imports.clear();
this->~modules();
throw m::error
{
"M_INIT_ERROR", "Failed to start :%s", what
@ -134,7 +134,7 @@ catch(const std::exception &e)
catch(const ctx::terminated &)
{
const ctx::exception_handler eh;
mods::imports.clear();
this->~modules();
throw ctx::terminated{};
}