summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index b389e58..cebd3f0 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -468,8 +468,10 @@ bool DataStore::Transaction::commit(const std::function<void(const DataStore::Er
468 const int rc = mdb_txn_commit(d->transaction); 468 const int rc = mdb_txn_commit(d->transaction);
469 if (rc) { 469 if (rc) {
470 abort(); 470 abort();
471 Error error(d->name.toLatin1(), ErrorCodes::GenericError, "Error during transaction commit: " + QByteArray(mdb_strerror(rc))); 471 Error error(d->name.toLatin1(), ErrorCodes::TransactionError, "Error during transaction commit: " + QByteArray(mdb_strerror(rc)));
472 errorHandler ? errorHandler(error) : d->defaultErrorHandler(error); 472 errorHandler ? errorHandler(error) : d->defaultErrorHandler(error);
473 //If transactions start failing we're in an unrecoverable situation (i.e. out of diskspace). So throw an exception that will terminate the application.
474 throw std::runtime_error("Fatal error while committing transaction.");
473 } 475 }
474 d->transaction = nullptr; 476 d->transaction = nullptr;
475 477