From 9700f38fc5f516e787365ea48561185e7de3b1b6 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 13 May 2019 12:46:38 -0700 Subject: [PATCH] ircd::m::dbs: Log errors on write here. --- ircd/m_dbs.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ircd/m_dbs.cc b/ircd/m_dbs.cc index cc9581e91..53d686ae1 100644 --- a/ircd/m_dbs.cc +++ b/ircd/m_dbs.cc @@ -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,