Improve error message
This commit is contained in:
parent
bd23e2417c
commit
e92b080f7a
1 changed files with 2 additions and 1 deletions
|
@ -251,6 +251,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);
|
||||
}
|
||||
|
@ -748,4 +749,4 @@ void Database::updateCashPointNo(int oldCashPointNo, int newCashPointNo)
|
|||
sqlite3_finalize(stmt);
|
||||
|
||||
endTransaction();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue