0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 11:48:54 +02:00

ircd::db::database::env: Branch for exception first in result loop.

This commit is contained in:
Jason Volk 2020-06-14 03:00:31 -07:00
parent f0d0705dfd
commit d9827f3daa

View file

@ -3391,13 +3391,16 @@ noexcept try
for(size_t i(0); i < num; ++i) try
{
assert(op[i].ret <= size(buf[i]));
const const_buffer read(buf[i], op[i].ret);
req[i].result = slice(read);
if(op[i].eptr)
std::rethrow_exception(op[i].eptr);
assert(op[i].ret <= size(buf[i]));
const const_buffer read
{
buf[i], op[i].ret
};
req[i].result = slice(read);
req[i].status = Status::OK();
}
catch(const std::exception &e)