Add logging for exceptions: (#4400)

Log exception messages at several locations.

Previously, these were locations where an exception was caught, but the
exception message was not logged. Logging the exception messages can be
useful for analysis or debugging. The additional logging could have a
small negative performance impact.

Fix #3213.
This commit is contained in:
drlongle
2023-03-30 19:13:30 +02:00
committed by GitHub
parent 135b63dbe0
commit 8bfdbcbab5
17 changed files with 99 additions and 52 deletions

View File

@@ -1162,9 +1162,10 @@ NetworkOPsImp::submitTransaction(std::shared_ptr<STTx const> const& iTrans)
return;
}
}
catch (std::exception const&)
catch (std::exception const& ex)
{
JLOG(m_journal.warn()) << "Exception checking transaction" << txid;
JLOG(m_journal.warn())
<< "Exception checking transaction " << txid << ": " << ex.what();
return;
}