]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3314] Add a catch-all to logger Formatter destructor
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 30 Jan 2014 07:47:28 +0000 (13:17 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 30 Jan 2014 07:47:28 +0000 (13:17 +0530)
src/lib/log/log_formatter.h

index 8cb34c7314340540a9e031098997c0000c046c0b..d336b309731a15fa2162a8e9099551a4b983caac 100644 (file)
@@ -163,8 +163,12 @@ public:
     /// This is the place where output happens if the formatter is active.
     ~ Formatter() {
         if (logger_) {
-            checkExcessPlaceholders(message_, ++nextPlaceholder_);
-            logger_->output(severity_, *message_);
+            try {
+                checkExcessPlaceholders(message_, ++nextPlaceholder_);
+                logger_->output(severity_, *message_);
+            } catch (...) {
+                // Catch and ignore all exceptions here.
+            }
             delete message_;
         }
     }