mirror of
https://github.com/matrix-construct/construct
synced 2024-09-30 04:38:52 +02:00
ircd:Ⓜ️:dbs: Throw exception for a null index here.
This commit is contained in:
parent
d534ee8afa
commit
aa5681dab9
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue