aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-02-13 19:54:47 +0200
committerRiccardo Spagni <ric@spagni.net>2016-02-13 19:54:47 +0200
commit63e2d4195ba6cbe20f80c5c1fc3d9e1ecbf7ebc0 (patch)
tree613caa2f567d0760c5ce7e671b57f2e1ade8acbc /src/blockchain_db/blockchain_db.h
parentMerge pull request #656 (diff)
parentBlockchainLMDB: Deal with DB exceptions at block level with particularity (diff)
downloadmonero-63e2d4195ba6cbe20f80c5c1fc3d9e1ecbf7ebc0.tar.xz
Merge pull request #657
1995923 BlockchainLMDB: Deal with DB exceptions at block level with particularity (warptangent) c16cc20 BlockchainLMDB: Add sanity check for inconsistent state (warptangent) 9118d0a BlockchainLMDB: Call destructor on allocated txn if setup fails (warptangent) f5581c3 BlockchainLMDB: Replace remaining txn pointer NULLs with nullptr (warptangent)
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 bb4602061..2aa4506e6 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: