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

ircd::db: Add cases for validity w/ critical log.

This commit is contained in:
Jason Volk 2020-01-10 15:51:59 -08:00
parent a95f448805
commit 9469099508

View file

@ -7973,11 +7973,32 @@ ircd::db::valid(const rocksdb::Iterator &it)
{
using rocksdb::Status;
case Status::kOk: break;
case Status::kNotFound: break;
case Status::kIncomplete: break;
case Status::kOk:
case Status::kNotFound:
case Status::kIncomplete:
break;
case Status::kCorruption:
{
const db::error error
{
it.status()
};
log::critical
{
"%s", error.what()
};
[[fallthrough]];
}
default:
throw_on_error(it.status());
throw_on_error
{
it.status()
};
__builtin_unreachable();
}