From 654985e981f6c00071e73bc73e1f638404c26430 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 23 Dec 2018 16:18:37 +0100 Subject: [PATCH] improve error message --- lmdb-safe.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lmdb-safe.hh b/lmdb-safe.hh index 95785cb..35b1eb9 100644 --- a/lmdb-safe.hh +++ b/lmdb-safe.hh @@ -374,8 +374,8 @@ public: void commit() { closeCursors(); - if(mdb_txn_commit(d_txn)) { - throw std::runtime_error("committing"); + if(int rc = mdb_txn_commit(d_txn)) { + throw std::runtime_error("committing: " + std::string(mdb_strerror(rc))); } d_parent->decRWTX();