From 86a9ed38b63444d2baa3955de2d2b905d54976b8 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 1 Oct 2018 12:36:07 +0200 Subject: [PATCH] Improve error message --- src/core/database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index 411fd10..6516223 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -225,6 +225,7 @@ unsigned int Database::storeSellers(std::vector>& seller if (retCode != SQLITE_DONE) { //rollbackTransaction(); std::string errMsg(sqlite3_errmsg(db_)); + errMsg += "\nSellerNo: " + std::to_string(seller->getSellerNo()); sqlite3_finalize(stmt); throw std::runtime_error(errMsg); } @@ -722,4 +723,4 @@ void Database::updateCashPointNo(int oldCashPointNo, int newCashPointNo) sqlite3_finalize(stmt); endTransaction(); -} \ No newline at end of file +}