0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 19:33:45 +02:00

modules/m_receipt: Stop propagation of some errors in handler loop.

This commit is contained in:
Jason Volk 2022-09-22 13:30:42 -07:00
parent 4a8302038a
commit 1915db6d78

View file

@ -58,8 +58,24 @@ handle_edu_m_receipt(const m::event &event,
at<"content"_>(event)
};
for(const auto &[room_id, content] : content)
for(const auto &[room_id, content] : content) try
{
handle_m_receipt(event, room_id, content);
}
catch(const ctx::interrupted &)
{
throw;
}
catch(const std::exception &e)
{
log::derror
{
m::receipt::log, "Failed to handle '%s' from %s :%s",
room_id,
json::get<"origin"_>(event),
e.what(),
};
}
}
void