From 7d8dae0ec07f35fd0c0a67d39bb31e3f9513ad91 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 4 Jul 2021 12:39:48 +0100 Subject: Get mysql statement errors from the statement, not connection --- lib/input/mysqlConn.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/input/mysqlConn.cpp') diff --git a/lib/input/mysqlConn.cpp b/lib/input/mysqlConn.cpp index 99c2891..305d638 100644 --- a/lib/input/mysqlConn.cpp +++ b/lib/input/mysqlConn.cpp @@ -12,6 +12,9 @@ namespace MyGrate::Input { MySQLErr::MySQLErr(const std::string & when, MYSQL * c) : std::runtime_error(when + ": " + mysql_error(c)) { } + MySQLErr::MySQLErr(const std::string & when, MYSQL_STMT * s) : std::runtime_error(when + ": " + mysql_stmt_error(s)) + { + } MySQLConn::MySQLConn(const char * const host, const char * const user, const char * const pass, unsigned short port, const char * const db) : -- cgit v1.2.3