aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
authorwarptangent <warptangent@tutanota.com>2016-02-13 04:10:27 -0800
committerwarptangent <warptangent@tutanota.com>2016-02-13 05:12:39 -0800
commit199592355998e801f9a5028e434aa364f4b58d8c (patch)
tree87dd479b132c2788746866314fef48c5bcc0abda /src/blockchain_db/blockchain_db.h
parentBlockchainLMDB: Add sanity check for inconsistent state (diff)
downloadmonero-199592355998e801f9a5028e434aa364f4b58d8c.tar.xz
BlockchainLMDB: Deal with DB exceptions at block level with particularity
Add another DB error exception type to distinguish failed txn setup from general use of txn. This keeps the error handling flow the same as before the block-level txn setup changes that moved control up a layer to BlockchainDB.
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r--src/blockchain_db/blockchain_db.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index 5926f34a5..fb1c586ea 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -175,6 +175,14 @@ class DB_ERROR : public DB_EXCEPTION
DB_ERROR(const char* s) : DB_EXCEPTION(s) { }
};
+// For distinguishing errors trying to set up a DB txn from other errors
+class DB_ERROR_TXN_START : public DB_EXCEPTION
+{
+ public:
+ DB_ERROR_TXN_START() : DB_EXCEPTION("DB Error in starting txn") { }
+ DB_ERROR_TXN_START(const char* s) : DB_EXCEPTION(s) { }
+};
+
class DB_OPEN_FAILURE : public DB_EXCEPTION
{
public: