0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:event: Log and propagate errors in the essential stack.

This commit is contained in:
Jason Volk 2019-08-27 17:08:39 -07:00
parent 766dfe027d
commit 9ec0c9c258

View file

@ -2598,6 +2598,7 @@ void
ircd::m::event::essential(json::iov &event,
const json::iov &contents,
const event::closure_iov_mutable &closure)
try
{
const auto &type
{
@ -2716,10 +2717,21 @@ ircd::m::event::essential(json::iov &event,
closure(event);
}
}
catch(const std::exception &e)
{
log::derror
{
log, "Error while isolating essential keys (redaction algorithm) :%s",
e.what(),
};
throw;
}
ircd::m::event
ircd::m::essential(m::event event,
const mutable_buffer &contentbuf)
try
{
const auto &type
{
@ -2798,6 +2810,16 @@ ircd::m::essential(m::event event,
json::get<"signatures"_>(event) = {};
return event;
}
catch(const std::exception &e)
{
log::derror
{
log, "Error while isolating essential keys (redaction algorithm) :%s",
e.what(),
};
throw;
}
ircd::m::id::event
ircd::m::make_id(const event &event,