mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 18:38:52 +02:00
ircd:Ⓜ️:init::modules: Call dtor to properly unload on init error.
This commit is contained in:
parent
dd4f133530
commit
6b467733a8
1 changed files with 3 additions and 3 deletions
|
@ -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{};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue