mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
add try catch to MicroCore::get_tx
This commit is contained in:
parent
8663f43f40
commit
ad91f74acd
1 changed files with 10 additions and 2 deletions
|
@ -137,8 +137,16 @@ MicroCore::get_tx(const crypto::hash& tx_hash, transaction& tx)
|
|||
if (m_blockchain_storage.have_tx(tx_hash))
|
||||
{
|
||||
// get transaction with given hash
|
||||
try
|
||||
{
|
||||
tx = m_blockchain_storage.get_db().get_tx(tx_hash);
|
||||
}
|
||||
catch (TX_DNE const& e)
|
||||
{
|
||||
cerr << "MicroCore::get_tx: " << e.what() << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "MicroCore::get_tx tx does not exist in blockchain: " << tx_hash << endl;
|
||||
|
|
Loading…
Reference in a new issue