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:
parent
4ef7754ed5
commit
075ef11386
1 changed files with 13 additions and 0 deletions
|
@ -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};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue