Improve reporting of missing node exceptions

This commit is contained in:
Nik Bougalis
2020-04-12 01:53:32 -07:00
parent b7631d2a28
commit bdd22e4d51
10 changed files with 44 additions and 90 deletions

View File

@@ -1806,10 +1806,10 @@ ApplicationImp::getLastFullLedger()
return {};
}
catch (SHAMapMissingNode& sn)
catch (SHAMapMissingNode const& mn)
{
JLOG (j.warn()) <<
"Ledger with missing nodes in database: " << sn;
"Ledger in database: " << mn.what();
return {};
}
}
@@ -2117,10 +2117,10 @@ bool ApplicationImp::loadOldLedger (
m_ledgerMaster->takeReplay (std::move (replayData));
}
}
catch (SHAMapMissingNode&)
catch (SHAMapMissingNode const& mn)
{
JLOG(m_journal.fatal()) <<
"Data is missing for selected ledger";
"While loading specified ledger: " << mn.what();
return false;
}
catch (boost::bad_lexical_cast&)