0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd:Ⓜ️:dbs: Log errors on write here.

This commit is contained in:
Jason Volk 2019-05-13 12:46:38 -07:00
parent 304c6df468
commit 9700f38fc5

View file

@ -219,6 +219,7 @@ void
ircd::m::dbs::write(db::txn &txn,
const event &event,
const write_opts &opts)
try
{
if(opts.event_idx == 0 && opts.blacklist)
return blacklist(txn, at<"event_id"_>(event), opts);
@ -233,6 +234,17 @@ ircd::m::dbs::write(db::txn &txn,
if(json::get<"room_id"_>(event))
_index_room(txn, event, opts);
}
catch(const std::exception &e)
{
log::error
{
log, "Event %s txn building error :%s",
json::get<"event_id"_>(event),
e.what()
};
throw;
}
void
ircd::m::dbs::blacklist(db::txn &txn,