@@ -14,6 +14,9 @@ struct Exception : public Poco::Exception
1414 int errnum () const { return code (); }
1515 const char * name () const noexcept override { return " mysqlxx::Exception" ; }
1616 const char * className () const noexcept override { return " mysqlxx::Exception" ; }
17+
18+ Exception * clone () const override { return new Exception (*this ); }
19+ void rethrow () const override { throw *this ; } // / NOLINT(cert-err60-cpp)
1720};
1821
1922
@@ -23,6 +26,9 @@ struct ConnectionFailed : public Exception
2326 explicit ConnectionFailed (const std::string & msg, int code = 0 ) : Exception(msg, code) {}
2427 const char * name () const noexcept override { return " mysqlxx::ConnectionFailed" ; }
2528 const char * className () const noexcept override { return " mysqlxx::ConnectionFailed" ; }
29+
30+ ConnectionFailed * clone () const override { return new ConnectionFailed (*this ); }
31+ void rethrow () const override { throw *this ; } // / NOLINT(cert-err60-cpp)
2632};
2733
2834
@@ -32,6 +38,9 @@ struct ConnectionLost : public Exception
3238 explicit ConnectionLost (const std::string & msg, int code = 0 ) : Exception(msg, code) {}
3339 const char * name () const noexcept override { return " mysqlxx::ConnectionLost" ; }
3440 const char * className () const noexcept override { return " mysqlxx::ConnectionLost" ; }
41+
42+ ConnectionLost * clone () const override { return new ConnectionLost (*this ); }
43+ void rethrow () const override { throw *this ; } // / NOLINT(cert-err60-cpp)
3544};
3645
3746
@@ -41,6 +50,9 @@ struct BadQuery : public Exception
4150 explicit BadQuery (const std::string & msg, int code = 0 ) : Exception(msg, code) {}
4251 const char * name () const noexcept override { return " mysqlxx::BadQuery" ; }
4352 const char * className () const noexcept override { return " mysqlxx::BadQuery" ; }
53+
54+ BadQuery * clone () const override { return new BadQuery (*this ); }
55+ void rethrow () const override { throw *this ; } // / NOLINT(cert-err60-cpp)
4456};
4557
4658
@@ -50,6 +62,9 @@ struct CannotParseValue : public Exception
5062 explicit CannotParseValue (const std::string & msg, int code = 0 ) : Exception(msg, code) {}
5163 const char * name () const noexcept override { return " mysqlxx::CannotParseValue" ; }
5264 const char * className () const noexcept override { return " mysqlxx::CannotParseValue" ; }
65+
66+ CannotParseValue * clone () const override { return new CannotParseValue (*this ); }
67+ void rethrow () const override { throw *this ; } // / NOLINT(cert-err60-cpp)
5368};
5469
5570
0 commit comments