Improve error message

This commit is contained in:
Martin Brodbeck 2018-10-01 12:36:07 +02:00
parent 91f52df554
commit 86a9ed38b6
1 changed files with 2 additions and 1 deletions

View File

@ -225,6 +225,7 @@ unsigned int Database::storeSellers(std::vector<std::unique_ptr<Seller>>& 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();
}
}