Günter Obiltschnig 6 years ago
parent
commit
b55db12286

+ 6 - 6
Data/MySQL/include/Poco/Data/MySQL/MySQLException.h

@@ -35,7 +35,7 @@ namespace Data {
 namespace MySQL {
 
 // End-user include this file and use in code ConnectionException/StatementException
-// So it need not know 
+// So it need not know
 
 class MySQL_API MySQLException: public Poco::Data::DataException
 	/// Base class for all MySQL exceptions
@@ -48,16 +48,16 @@ public:
 	MySQLException(const MySQLException& exc);
 		/// Creates MySQLException.
 
-	~MySQLException() throw();
+	~MySQLException() noexcept;
 		/// Destroys MySQLexception.
 
 	MySQLException& operator=(const MySQLException& exc);
 		/// Assignment operator.
 
-	const char* name() const throw();
+	const char* name() const noexcept;
 		/// Returns exception name.
 
-	const char* className() const throw();
+	const char* className() const noexcept;
 		/// Returns the name of the exception class.
 
 	Poco::Exception* clone() const;
@@ -133,12 +133,12 @@ inline MySQLException& MySQLException::operator=(const MySQLException& exc)
 	return *this;
 }
 
-inline const char* MySQLException::name() const throw()
+inline const char* MySQLException::name() const noexcept
 {
 	return "MySQL";
 }
 
-inline const char* MySQLException::className() const throw()
+inline const char* MySQLException::className() const noexcept
 {
 	return typeid(*this).name();
 }

+ 3 - 5
Data/MySQL/src/MySQLException.cpp

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

+ 10 - 10
Data/ODBC/include/Poco/Data/ODBC/ODBCException.h

@@ -47,36 +47,36 @@ public:
 		message(_error.toString());
 	}
 
-	HandleException(const H& handle, const std::string& msg): 
-		ODBCException(msg), 
+	HandleException(const H& handle, const std::string& msg):
+		ODBCException(msg),
 		_error(handle)
 		/// Creates HandleException
 	{
 		extendedMessage(_error.toString());
-	}							
+	}
 
-	HandleException(const H& handle, const std::string& msg, const std::string& arg): 
-		ODBCException(msg, arg), 
+	HandleException(const H& handle, const std::string& msg, const std::string& arg):
+		ODBCException(msg, arg),
 		_error(handle)
 		/// Creates HandleException
 	{
 	}
 
-	HandleException(const H& handle, const std::string& msg, const Poco::Exception& exc): 
+	HandleException(const H& handle, const std::string& msg, const Poco::Exception& exc):
 		ODBCException(msg, exc),
 		_error(handle)
 		/// Creates HandleException
 	{
 	}
 
-	HandleException(const HandleException& exc): 
+	HandleException(const HandleException& exc):
 		ODBCException(exc),
 		_error(exc._error)
 		/// Creates HandleException
 	{
 	}
 
-	~HandleException() throw()
+	~HandleException() noexcept
 		/// Destroys HandleException
 	{
 	}
@@ -89,13 +89,13 @@ public:
 		return *this;
 	}
 
-	const char* name() const throw()
+	const char* name() const noexcept
 		/// Returns the name of the exception
 	{
 		return "ODBC handle exception";
 	}
 
-	const char* className() const throw()
+	const char* className() const noexcept
 		/// Returns the HandleException class name.
 	{
 		return typeid(*this).name();

+ 5 - 5
Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQLException.h

@@ -41,16 +41,16 @@ public:
 	PostgreSQLException(const PostgreSQLException& exc);
 		/// Creates PostgreSQLException.
 
-	~PostgreSQLException() throw();
+	~PostgreSQLException() noexcept;
 		/// Destroys PostgreSQLexception.
 
 	PostgreSQLException& operator=(const PostgreSQLException& exc);
 		/// Assignment operator.
 
-	const char* name() const throw();
+	const char* name() const noexcept;
 		/// Returns exception name.
 
-	const char* className() const throw();
+	const char* className() const noexcept;
 		/// Returns the name of the exception class.
 
 	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";
 }
 
 
-inline const char* PostgreSQLException::className() const throw()
+inline const char* PostgreSQLException::className() const noexcept
 {
 	return typeid(*this).name();
 }