0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-25 21:38:18 +02:00

ircd::db: Assertion for non-empty key seek.

This commit is contained in:
Jason Volk 2018-04-17 20:07:21 -07:00
parent b95a588bc4
commit e6a80082c8

View file

@ -5156,10 +5156,11 @@ void
ircd::db::valid_eq_or_throw(const rocksdb::Iterator &it,
const string_view &sv)
{
assert(!empty(sv));
if(!valid_eq(it, sv))
{
throw_on_error(it.status());
throw not_found();
throw not_found{};
}
}
@ -5169,7 +5170,7 @@ ircd::db::valid_or_throw(const rocksdb::Iterator &it)
if(!valid(it))
{
throw_on_error(it.status());
throw not_found();
throw not_found{};
//assert(0); // status == ok + !Valid() == ???
}
}