This commit is contained in:
Günter Obiltschnig 2020-01-10 12:30:06 +01:00
parent e1f09a602b
commit b55db12286
4 changed files with 24 additions and 26 deletions

View File

@ -48,16 +48,16 @@ public:
MySQLException(const MySQLException& exc); MySQLException(const MySQLException& exc);
/// Creates MySQLException. /// Creates MySQLException.
~MySQLException() throw(); ~MySQLException() noexcept;
/// Destroys MySQLexception. /// Destroys MySQLexception.
MySQLException& operator=(const MySQLException& exc); MySQLException& operator=(const MySQLException& exc);
/// Assignment operator. /// Assignment operator.
const char* name() const throw(); const char* name() const noexcept;
/// Returns exception name. /// Returns exception name.
const char* className() const throw(); const char* className() const noexcept;
/// Returns the name of the exception class. /// Returns the name of the exception class.
Poco::Exception* clone() const; Poco::Exception* clone() const;
@ -133,12 +133,12 @@ inline MySQLException& MySQLException::operator=(const MySQLException& exc)
return *this; return *this;
} }
inline const char* MySQLException::name() const throw() inline const char* MySQLException::name() const noexcept
{ {
return "MySQL"; return "MySQL";
} }
inline const char* MySQLException::className() const throw() inline const char* MySQLException::className() const noexcept
{ {
return typeid(*this).name(); return typeid(*this).name();
} }

View File

@ -16,6 +16,7 @@
#include <mysql.h> #include <mysql.h>
#include <stdio.h> #include <stdio.h>
namespace Poco { namespace Poco {
namespace Data { namespace Data {
namespace MySQL { namespace MySQL {
@ -31,16 +32,14 @@ MySQLException::MySQLException(const MySQLException& exc) : Poco::Data::DataExce
} }
MySQLException::~MySQLException() throw() MySQLException::~MySQLException() noexcept
{ {
} }
/////
// //
// ConnectionException // ConnectionException
// //
/////
ConnectionException::ConnectionException(const std::string& msg) : MySQLException(msg) ConnectionException::ConnectionException(const std::string& msg) : MySQLException(msg)
@ -72,11 +71,9 @@ std::string ConnectionException::compose(const std::string& text, MYSQL* h)
} }
/////
// //
// TransactionException // TransactionException
// //
/////
TransactionException::TransactionException(const std::string& msg) : ConnectionException(msg) TransactionException::TransactionException(const std::string& msg) : ConnectionException(msg)
@ -135,4 +132,5 @@ std::string StatementException::compose(const std::string& text, MYSQL_STMT* h,
return str; return str;
} }
} } } // namespace Poco::Data::MySQL } } } // namespace Poco::Data::MySQL

View File

@ -76,7 +76,7 @@ public:
{ {
} }
~HandleException() throw() ~HandleException() noexcept
/// Destroys HandleException /// Destroys HandleException
{ {
} }
@ -89,13 +89,13 @@ public:
return *this; return *this;
} }
const char* name() const throw() const char* name() const noexcept
/// Returns the name of the exception /// Returns the name of the exception
{ {
return "ODBC handle exception"; return "ODBC handle exception";
} }
const char* className() const throw() const char* className() const noexcept
/// Returns the HandleException class name. /// Returns the HandleException class name.
{ {
return typeid(*this).name(); return typeid(*this).name();

View File

@ -41,16 +41,16 @@ public:
PostgreSQLException(const PostgreSQLException& exc); PostgreSQLException(const PostgreSQLException& exc);
/// Creates PostgreSQLException. /// Creates PostgreSQLException.
~PostgreSQLException() throw(); ~PostgreSQLException() noexcept;
/// Destroys PostgreSQLexception. /// Destroys PostgreSQLexception.
PostgreSQLException& operator=(const PostgreSQLException& exc); PostgreSQLException& operator=(const PostgreSQLException& exc);
/// Assignment operator. /// Assignment operator.
const char* name() const throw(); const char* name() const noexcept;
/// Returns exception name. /// Returns exception name.
const char* className() const throw(); const char* className() const noexcept;
/// Returns the name of the exception class. /// Returns the name of the exception class.
Poco::Exception* clone() const; Poco::Exception* clone() const;
@ -110,13 +110,13 @@ inline PostgreSQLException& PostgreSQLException::operator=(const PostgreSQLExcep
} }
inline const char* PostgreSQLException::name() const throw() inline const char* PostgreSQLException::name() const noexcept
{ {
return "PostgreSQL"; return "PostgreSQL";
} }
inline const char* PostgreSQLException::className() const throw() inline const char* PostgreSQLException::className() const noexcept
{ {
return typeid(*this).name(); return typeid(*this).name();
} }