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-command.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmysqlpp/my-command.cpp') diff --git a/libmysqlpp/my-command.cpp b/libmysqlpp/my-command.cpp index bfa25e6..defb8a7 100644 --- a/libmysqlpp/my-command.cpp +++ b/libmysqlpp/my-command.cpp @@ -10,10 +10,10 @@ MySQL::Command::Command(const Connection * conn, const std::string & sql) : paramsNeedBinding(false) { if (!stmt) { - throw Error(mysql_error(&conn->conn)); + throw Error(&conn->conn); } if (mysql_stmt_prepare(stmt, sql.c_str(), sql.length())) { - throw Error(mysql_stmt_error(stmt)); + throw Error(stmt); } binds.resize(mysql_stmt_param_count(stmt)); if (binds.size()) { @@ -165,7 +165,7 @@ MySQL::Command::bindParams() { if (paramsNeedBinding) { if (mysql_stmt_bind_param(stmt, &binds.front())) { - throw Error(mysql_stmt_error(stmt)); + throw Error(stmt); paramsNeedBinding = false; } } -- cgit v1.2.3