Remove some "Env::close" noise from unit test output

This commit is contained in:
Scott Schurr
2021-03-12 18:14:39 -08:00
committed by manojsdoshi
parent 9eb9b8f631
commit 09ae9168ca
4 changed files with 19 additions and 9 deletions

View File

@@ -136,9 +136,15 @@ Env::close(
auto resp = rpc("ledger_accept");
if (resp["result"]["status"] != std::string("success"))
{
JLOG(journal.error())
<< "Env::close() failed: " << resp["result"]["status"]
<< std::endl;
std::string reason = "internal error";
if (resp.isMember("error_what"))
reason = resp["error_what"].asString();
else if (resp.isMember("error_message"))
reason = resp["error_message"].asString();
else if (resp.isMember("error"))
reason = resp["error"].asString();
JLOG(journal.error()) << "Env::close() failed: " << reason;
res = false;
}
}