0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +01:00

ircd:Ⓜ️:dbs: Throw exception for a null index here.

This commit is contained in:
Jason Volk 2018-04-23 18:14:30 -07:00
parent d534ee8afa
commit aa5681dab9

View file

@ -109,7 +109,11 @@ ircd::m::dbs::write(db::txn &txn,
const event &event, const event &event,
const write_opts &opts) 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 db::txn::append
{ {