From 97c3d4c1604b525e4522814e34723488c59a83f5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Dec 2015 02:42:43 +0000 Subject: Reshuffle and add new exceptions --- libmysqlpp/my-selectcommand.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libmysqlpp/my-selectcommand.cpp') 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); } } -- cgit v1.2.3