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:
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 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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue