0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

ircd::db::database::env: Add errorlog and assertion on MultiRead() result.

This commit is contained in:
Jason Volk 2020-06-14 22:11:03 -07:00
parent 4ef7754ed5
commit 075ef11386

View file

@ -3402,9 +3402,22 @@ noexcept try
req[i].result = slice(read);
req[i].status = Status::OK();
assert(req[i].result.size() == req[i].len);
}
catch(const std::exception &e)
{
log::error
{
log, "[%s] rfile:%p multiread:%zu:%zu offset:%zu length:%zu :%s",
d.name,
this,
i,
num,
req[i].offset,
req[i].len,
e.what(),
};
req[i].status = error_to_status{e};
}