From 231bc3fc8d1902bb19b6fce39ffd72cce4b4f2c3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 12 Jun 2021 20:26:01 +0100 Subject: Avoid direct use of runtime_error in MySQL stuff Adds proper exception which extends it and gets the MySQL error message. --- lib/input/mysqlConn.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/input/mysqlConn.h') diff --git a/lib/input/mysqlConn.h b/lib/input/mysqlConn.h index db30ff0..d779fd1 100644 --- a/lib/input/mysqlConn.h +++ b/lib/input/mysqlConn.h @@ -10,6 +10,11 @@ namespace MyGrate { class DbValue; } namespace MyGrate::Input { + class MySQLErr : public std::runtime_error { + public: + MySQLErr(const std::string & when, MYSQL *); + }; + class MySQLConn : public MYSQL, public DbConn { public: static constexpr auto paramMode {ParamMode::QMark}; -- cgit v1.2.3