summaryrefslogtreecommitdiff
path: root/libmysqlpp/my-selectcommand.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
commit97c3d4c1604b525e4522814e34723488c59a83f5 (patch)
treecd9ca0e4b7013d4af1c85c4a677a2cbb12bb9603 /libmysqlpp/my-selectcommand.cpp
parentRemove rebind (diff)
downloadlibdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.tar.bz2
libdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.tar.xz
libdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.zip
Reshuffle and add new exceptions
Diffstat (limited to 'libmysqlpp/my-selectcommand.cpp')
-rw-r--r--libmysqlpp/my-selectcommand.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libmysqlpp/my-selectcommand.cpp b/libmysqlpp/my-selectcommand.cpp
index 257f33f..5be6bf0 100644
--- a/libmysqlpp/my-selectcommand.cpp
+++ b/libmysqlpp/my-selectcommand.cpp
@@ -62,21 +62,21 @@ MySQL::SelectCommand::execute()
case MYSQL_TYPE_GEOMETRY:
default:
mysql_free_result(prepare_meta_result);
- throw Error("Unexpected type");
+ throw DB::ColumnTypeNotSupported();
}
}
mysql_free_result(prepare_meta_result);
if (mysql_stmt_bind_result(stmt, &fields.front())) {
- throw Error(mysql_stmt_error(stmt));
+ throw Error(stmt);
}
prepared = true;
}
if (!executed) {
if (mysql_stmt_execute(stmt)) {
- throw Error(mysql_stmt_error(stmt));
+ throw Error(stmt);
}
if (mysql_stmt_store_result(stmt)) {
- throw Error(mysql_stmt_error(stmt));
+ throw Error(stmt);
}
executed = true;
}
@@ -93,7 +93,7 @@ MySQL::SelectCommand::fetch()
executed = false;
return false;
default:
- throw Error(mysql_stmt_error(stmt));
+ throw Error(stmt);
}
}