mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
modules/s_conf: Handle exception on the update hook.
This commit is contained in:
parent
bd3e004d70
commit
795f0488e4
1 changed files with 10 additions and 1 deletions
|
@ -57,7 +57,7 @@ get_conf_item(const string_view &key,
|
|||
|
||||
static void
|
||||
update_conf(const m::event &event)
|
||||
noexcept
|
||||
noexcept try
|
||||
{
|
||||
const auto &content
|
||||
{
|
||||
|
@ -81,6 +81,15 @@ noexcept
|
|||
|
||||
ircd::conf::set(key, value);
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::error
|
||||
{
|
||||
"Failed to set conf item '%s' :%s",
|
||||
json::get<"state_key"_>(event),
|
||||
e.what()
|
||||
};
|
||||
}
|
||||
|
||||
const m::hook
|
||||
update_conf_hook
|
||||
|
|
Loading…
Reference in a new issue