summaryrefslogtreecommitdiff
path: root/libsqlitepp/sqlite-modifycommand.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 02:42:43 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 06:00:07 +0000
commit3a7e2b9a7bde4682f2273022e9d2ddecd7e5e3b8 (patch)
treed5dc58209bd8fa28047c54a11c09bc64505d5354 /libsqlitepp/sqlite-modifycommand.cpp
parentRemove rebind (diff)
downloadlibdbpp-sqlite-3a7e2b9a7bde4682f2273022e9d2ddecd7e5e3b8.tar.bz2
libdbpp-sqlite-3a7e2b9a7bde4682f2273022e9d2ddecd7e5e3b8.tar.xz
libdbpp-sqlite-3a7e2b9a7bde4682f2273022e9d2ddecd7e5e3b8.zip
Reshuffle and add new exceptions
Diffstat (limited to 'libsqlitepp/sqlite-modifycommand.cpp')
-rw-r--r--libsqlitepp/sqlite-modifycommand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsqlitepp/sqlite-modifycommand.cpp b/libsqlitepp/sqlite-modifycommand.cpp
index cb5d761..d5f44cc 100644
--- a/libsqlitepp/sqlite-modifycommand.cpp
+++ b/libsqlitepp/sqlite-modifycommand.cpp
@@ -19,12 +19,12 @@ SQLite::ModifyCommand::execute(bool anc)
{
if (sqlite3_step(stmt) != SQLITE_DONE) {
sqlite3_reset(stmt);
- throw Error(sqlite3_errmsg(c->db));
+ throw Error(c->db);
}
unsigned int rows = sqlite3_changes(c->db);
sqlite3_reset(stmt);
if (rows == 0 && !anc) {
- throw Error("No rows affected");
+ throw DB::NoRowsAffected();
}
return rows;
}