mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +01:00
ircd:Ⓜ️:dbs: Log errors on write here.
This commit is contained in:
parent
304c6df468
commit
9700f38fc5
1 changed files with 12 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue