[cpp-log4shib] 04/11: New patch: Remove dynamic exception specifications forbidden by ISO C++17

Scott Cantor cantor.2 at osu.edu
Tue Oct 19 16:15:25 UTC 2021


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to annotated tag debian/2.0.0-3
in repository cpp-log4shib.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-log4shib.git;a=commit;h=8f0aa87ae68a5c90597aca29d26498a5b50402f4

commit 8f0aa87ae68a5c90597aca29d26498a5b50402f4
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Tue Oct 12 12:31:23 2021 +0200

    New patch: Remove dynamic exception specifications forbidden by ISO C++17
    
    Closes: #984222
---
 ...xception-specifications-forbidden-by-ISO-.patch | 260 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 261 insertions(+)

diff --git a/debian/patches/Remove-dynamic-exception-specifications-forbidden-by-ISO-.patch b/debian/patches/Remove-dynamic-exception-specifications-forbidden-by-ISO-.patch
new file mode 100644
index 0000000..e9093e6
--- /dev/null
+++ b/debian/patches/Remove-dynamic-exception-specifications-forbidden-by-ISO-.patch
@@ -0,0 +1,260 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at debian.org>
+Date: Tue, 12 Oct 2021 12:30:35 +0200
+Subject: Remove dynamic exception specifications forbidden by ISO C++17
+
+Closes: #984222
+---
+ include/log4shib/Category.hh             | 4 ++--
+ include/log4shib/PatternLayout.hh        | 2 +-
+ include/log4shib/Priority.hh             | 2 +-
+ include/log4shib/PropertyConfigurator.hh | 2 +-
+ include/log4shib/SimpleConfigurator.hh   | 4 ++--
+ src/Category.cpp                         | 4 ++--
+ src/PatternLayout.cpp                    | 2 +-
+ src/Priority.cpp                         | 2 +-
+ src/PropertyConfigurator.cpp             | 2 +-
+ src/PropertyConfiguratorImpl.cpp         | 8 ++++----
+ src/PropertyConfiguratorImpl.hh          | 8 ++++----
+ src/SimpleConfigurator.cpp               | 4 ++--
+ 12 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/include/log4shib/Category.hh b/include/log4shib/Category.hh
+index f06c806..f0aed3f 100644
+--- a/include/log4shib/Category.hh
++++ b/include/log4shib/Category.hh
+@@ -112,7 +112,7 @@ namespace log4shib {
+          * Priority::NOTSET on the Root Category.
+          **/
+         virtual void setPriority(Priority::Value priority) 
+-        throw(std::invalid_argument);
++        noexcept(false);
+ 
+         /**
+          * Returns the assigned Priority, if any, for this Category.
+@@ -146,7 +146,7 @@ namespace log4shib {
+          * @exception std::invalid_argument if the appender is NULL.
+          **/
+         virtual void addAppender(Appender* appender) 
+-        throw(std::invalid_argument);
++        noexcept(false);
+ 
+         /**
+          * Adds an Appender for this Category.
+diff --git a/include/log4shib/PatternLayout.hh b/include/log4shib/PatternLayout.hh
+index 4428edc..fb9604d 100644
+--- a/include/log4shib/PatternLayout.hh
++++ b/include/log4shib/PatternLayout.hh
+@@ -80,7 +80,7 @@ namespace log4shib {
+            @exception ConfigureFailure if the pattern is invalid
+          **/
+         virtual void setConversionPattern(const std::string& conversionPattern)
+-            throw(ConfigureFailure);
++            noexcept(false);
+ 
+         virtual std::string getConversionPattern() const;
+ 
+diff --git a/include/log4shib/Priority.hh b/include/log4shib/Priority.hh
+index 3ebfd94..d81e8e6 100644
+--- a/include/log4shib/Priority.hh
++++ b/include/log4shib/Priority.hh
+@@ -103,7 +103,7 @@ namespace log4shib {
+ 	 * correspond with a known Priority name or a number
+ 	 **/
+         static Value getPriorityValue(const std::string& priorityName)
+-	throw(std::invalid_argument);
++	noexcept(false);
+     };
+ }
+ 
+diff --git a/include/log4shib/PropertyConfigurator.hh b/include/log4shib/PropertyConfigurator.hh
+index e272967..5d58f2e 100644
+--- a/include/log4shib/PropertyConfigurator.hh
++++ b/include/log4shib/PropertyConfigurator.hh
+@@ -45,7 +45,7 @@ namespace log4shib {
+     **/
+     class LOG4SHIB_EXPORT PropertyConfigurator {
+         public:
+-        static void configure(const std::string& initFileName) throw (ConfigureFailure);
++        static void configure(const std::string& initFileName) noexcept(false);
+     };
+ }
+ 
+diff --git a/include/log4shib/SimpleConfigurator.hh b/include/log4shib/SimpleConfigurator.hh
+index 55a5ac0..6b135c4 100644
+--- a/include/log4shib/SimpleConfigurator.hh
++++ b/include/log4shib/SimpleConfigurator.hh
+@@ -34,7 +34,7 @@ namespace log4shib {
+          * @exception ConfigureFailure if the method encountered a read or 
+          * syntax error.
+          **/
+-        static void configure(const std::string& initFileName) throw (ConfigureFailure);
++        static void configure(const std::string& initFileName) noexcept(false);
+ 
+         /**
+          * Configure log4shib with the configuration in the given file.
+@@ -45,7 +45,7 @@ namespace log4shib {
+          * @exception ConfigureFailure if the method encountered a read or 
+          * syntax error.
+          **/
+-        static void configure(std::istream& initFile) throw (ConfigureFailure);    };
++        static void configure(std::istream& initFile) noexcept(false);    };
+ }
+ 
+ #endif
+diff --git a/src/Category.cpp b/src/Category.cpp
+index 0eb083b..a6557fe 100644
+--- a/src/Category.cpp
++++ b/src/Category.cpp
+@@ -69,7 +69,7 @@ namespace log4shib {
+     }
+ 
+     void Category::setPriority(Priority::Value priority)
+-    throw(std::invalid_argument) {
++    noexcept(false) {
+         if ((priority < Priority::NOTSET) || (getParent() != NULL)) {
+             _priority = priority;
+         } else {
+@@ -92,7 +92,7 @@ namespace log4shib {
+     }
+     
+     void Category::addAppender(Appender* appender) 
+-    throw(std::invalid_argument) {
++    noexcept(false) {
+         if (appender) {
+             threading::ScopedLock lock(_appenderSetMutex);
+             {
+diff --git a/src/PatternLayout.cpp b/src/PatternLayout.cpp
+index 6ee2877..0cd1b2f 100644
+--- a/src/PatternLayout.cpp
++++ b/src/PatternLayout.cpp
+@@ -280,7 +280,7 @@ namespace log4shib {
+         _conversionPattern = "";
+     }
+ 
+-    void PatternLayout::setConversionPattern(const std::string& conversionPattern) throw(ConfigureFailure) {
++    void PatternLayout::setConversionPattern(const std::string& conversionPattern) noexcept(false) {
+ #ifdef LOG4SHIB_HAVE_SSTREAM 
+         std::istringstream conversionStream(conversionPattern);
+ #else
+diff --git a/src/Priority.cpp b/src/Priority.cpp
+index fccb479..5bccf32 100644
+--- a/src/Priority.cpp
++++ b/src/Priority.cpp
+@@ -28,7 +28,7 @@ namespace log4shib {
+     }
+ 
+     Priority::Value Priority::getPriorityValue(const std::string& priorityName) 
+-    throw(std::invalid_argument) {
++    noexcept(false) {
+ 	Priority::Value value = -1;
+ 
+ 	for (unsigned int i = 0; i < 10; i++) {
+diff --git a/src/PropertyConfigurator.cpp b/src/PropertyConfigurator.cpp
+index ddb9079..ad053da 100644
+--- a/src/PropertyConfigurator.cpp
++++ b/src/PropertyConfigurator.cpp
+@@ -11,7 +11,7 @@
+ 
+ namespace log4shib {
+ 
+-    void PropertyConfigurator::configure(const std::string& initFileName) throw (ConfigureFailure) {
++    void PropertyConfigurator::configure(const std::string& initFileName) noexcept(false) {
+         PropertyConfiguratorImpl configurator;
+         
+         configurator.doConfigure(initFileName);
+diff --git a/src/PropertyConfiguratorImpl.cpp b/src/PropertyConfiguratorImpl.cpp
+index 2bfef39..ec9c267 100644
+--- a/src/PropertyConfiguratorImpl.cpp
++++ b/src/PropertyConfiguratorImpl.cpp
+@@ -62,7 +62,7 @@ namespace log4shib {
+     PropertyConfiguratorImpl::~PropertyConfiguratorImpl() {
+     }
+ 
+-    void PropertyConfiguratorImpl::doConfigure(const std::string& initFileName) throw (ConfigureFailure) {
++    void PropertyConfiguratorImpl::doConfigure(const std::string& initFileName) noexcept(false) {
+         std::ifstream initFile(initFileName.c_str());
+ 
+         if (!initFile) {
+@@ -73,7 +73,7 @@ namespace log4shib {
+     }
+ 
+ 
+-    void PropertyConfiguratorImpl::doConfigure(std::istream& in) throw (ConfigureFailure) {
++    void PropertyConfiguratorImpl::doConfigure(std::istream& in) noexcept(false) {
+         // parse the file to get all of the configuration
+         _properties.load(in);
+ 
+@@ -89,7 +89,7 @@ namespace log4shib {
+         }
+     }
+ 
+-    void PropertyConfiguratorImpl::instantiateAllAppenders() throw(ConfigureFailure) {
++    void PropertyConfiguratorImpl::instantiateAllAppenders() noexcept(false) {
+         std::string currentAppender;
+ 
+         std::string prefix("appender");
+@@ -131,7 +131,7 @@ namespace log4shib {
+         }
+     }
+ 
+-    void PropertyConfiguratorImpl::configureCategory(const std::string& categoryName) throw (ConfigureFailure) {
++    void PropertyConfiguratorImpl::configureCategory(const std::string& categoryName) noexcept(false) {
+         // start by reading the "rootCategory" key
+         std::string tempCatName = 
+             (categoryName == "rootCategory") ? categoryName : "category." + categoryName;
+diff --git a/src/PropertyConfiguratorImpl.hh b/src/PropertyConfiguratorImpl.hh
+index 520c35c..a33ccfc 100644
+--- a/src/PropertyConfiguratorImpl.hh
++++ b/src/PropertyConfiguratorImpl.hh
+@@ -29,9 +29,9 @@ namespace log4shib {
+         PropertyConfiguratorImpl();
+         virtual ~PropertyConfiguratorImpl();
+         virtual void doConfigure(const std::string& initFileName)
+-            throw (ConfigureFailure);
++            noexcept(false);
+         virtual void doConfigure(std::istream& in)
+-            throw (ConfigureFailure);
++            noexcept(false);
+ 
+         protected:
+         /**
+@@ -42,7 +42,7 @@ namespace log4shib {
+            The name 'rootCategory' refers to the root Category.
+            throw ConfigureFailure
+          **/
+-        void configureCategory(const std::string& categoryname) throw (ConfigureFailure);
++        void configureCategory(const std::string& categoryname) noexcept(false);
+ 
+         /**
+          * Get a list of categories for which we should do the configuration.  This simply
+@@ -51,7 +51,7 @@ namespace log4shib {
+          */
+         void getCategories(std::vector<std::string>& categories) const;
+ 
+-        void instantiateAllAppenders() throw(ConfigureFailure);
++        void instantiateAllAppenders() noexcept(false);
+ 
+         /**
+          * Intantiate and configure the appender referred to by the given name. This method searches the
+diff --git a/src/SimpleConfigurator.cpp b/src/SimpleConfigurator.cpp
+index bd5fb4c..6c2b0f0 100644
+--- a/src/SimpleConfigurator.cpp
++++ b/src/SimpleConfigurator.cpp
+@@ -42,7 +42,7 @@
+ 
+ namespace log4shib {
+ 
+-    void SimpleConfigurator::configure(const std::string& initFileName) throw (ConfigureFailure) {
++    void SimpleConfigurator::configure(const std::string& initFileName) noexcept(false) {
+         std::ifstream initFile(initFileName.c_str());
+         
+         if (!initFile) {
+@@ -52,7 +52,7 @@ namespace log4shib {
+         configure(initFile);
+     }
+           
+-    void SimpleConfigurator::configure(std::istream& initFile) throw (ConfigureFailure) {
++    void SimpleConfigurator::configure(std::istream& initFile) noexcept(false) {
+         std::string nextCommand;
+         std::string categoryName;
+         
diff --git a/debian/patches/series b/debian/patches/series
index a9d5a21..7fb8930 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 Disable-building-the-static-library-by-default.patch
 Simplify-C-XX-FLAGS-handling.patch
+Remove-dynamic-exception-specifications-forbidden-by-ISO-.patch

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list