diff --git a/ircd/m/dbs.cc b/ircd/m/dbs.cc index 2ed47e533..9766bdc9e 100644 --- a/ircd/m/dbs.cc +++ b/ircd/m/dbs.cc @@ -109,7 +109,11 @@ ircd::m::dbs::write(db::txn &txn, const event &event, const write_opts &opts) { - assert(opts.idx != 0); + if(unlikely(opts.idx == 0)) + throw ircd::error + { + "Cannot write to database: no index specified for event." + }; db::txn::append {