aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-04 09:23:38 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-04 10:18:38 +0100
commitdbfef643ed1f0be675afb17c2541616c8b5f6a3c (patch)
treeb14f41c27203ff4f0bb004eadb6abafd5ec423b2 /src/cryptonote_core
parentMerge pull request #2384 (diff)
downloadmonero-dbfef643ed1f0be675afb17c2541616c8b5f6a3c.tar.xz
tx_pool: catch exceptions in LockedTXN dtor
This might prevent some calls to terminate when the LockedTXN dtor is called as part of stack unwinding caused by another exception in the first place.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 68e0b556f..e61d95ac3 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -92,7 +92,7 @@ namespace cryptonote
LockedTXN(Blockchain &b): m_blockchain(b), m_batch(false) {
m_batch = m_blockchain.get_db().batch_start();
}
- ~LockedTXN() { if (m_batch) { m_blockchain.get_db().batch_stop(); } }
+ ~LockedTXN() { try { if (m_batch) { m_blockchain.get_db().batch_stop(); } } catch (const std::exception &e) { MWARNING("LockedTXN dtor filtering exception: " << e.what()); } }
private:
Blockchain &m_blockchain;
bool m_batch;