diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-29 02:42:43 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-29 06:00:07 +0000 |
commit | 97c3d4c1604b525e4522814e34723488c59a83f5 (patch) | |
tree | cd9ca0e4b7013d4af1c85c4a677a2cbb12bb9603 /libmysqlpp/my-command.cpp | |
parent | Remove rebind (diff) | |
download | libdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.tar.bz2 libdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.tar.xz libdbpp-mysql-97c3d4c1604b525e4522814e34723488c59a83f5.zip |
Reshuffle and add new exceptions
Diffstat (limited to 'libmysqlpp/my-command.cpp')
-rw-r--r-- | libmysqlpp/my-command.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } } |