BIND 10 master, updated. cdadcd5d6a6bd594fdbcb9efe628067879623df6 [master] Compilation fix
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jul 4 12:36:26 UTC 2011
The branch, master has been updated
via cdadcd5d6a6bd594fdbcb9efe628067879623df6 (commit)
from 4d81613695a03b3d39adb5b54822dc1a07a37af0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cdadcd5d6a6bd594fdbcb9efe628067879623df6
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Jul 4 13:59:21 2011 +0200
[master] Compilation fix
Clang seems to be confused by too many templates and function
overloading, so we sacrifice little bit of convenience to make it happy.
-----------------------------------------------------------------------
Summary of changes:
src/lib/log/log_formatter.h | 13 -------------
src/lib/log/tests/log_formatter_unittest.cc | 15 ---------------
src/lib/server_common/portconfig.cc | 4 ++--
3 files changed, 2 insertions(+), 30 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/log/log_formatter.h b/src/lib/log/log_formatter.h
index f43e4af..11dec84 100644
--- a/src/lib/log/log_formatter.h
+++ b/src/lib/log/log_formatter.h
@@ -181,19 +181,6 @@ public:
}
return (*this);
}
-
- /// \brief Exception version of arg.
- ///
- /// \param e An exception which the "what()" is extracted an put into the
- /// message.
- Formatter& arg(const std::exception& e) {
- if (logger_) {
- return (arg(e.what()));
- } else {
- return (*this);
- }
- }
-
};
}
diff --git a/src/lib/log/tests/log_formatter_unittest.cc b/src/lib/log/tests/log_formatter_unittest.cc
index 6fda840..b91665d 100644
--- a/src/lib/log/tests/log_formatter_unittest.cc
+++ b/src/lib/log/tests/log_formatter_unittest.cc
@@ -123,19 +123,4 @@ TEST_F(FormatterTest, noRecurse) {
EXPECT_EQ("%1 %1", outputs[0].second);
}
-// Test it can accept exceptions (which don't have a default conversion
-// to string by themself)
-TEST_F(FormatterTest, exception) {
- class Ex : public std::exception {
- public:
- virtual const char* what() const throw() {
- return "Exception test";
- }
- };
- Formatter(isc::log::INFO, s("%1"), this).arg(Ex());
- ASSERT_EQ(1, outputs.size());
- EXPECT_EQ(isc::log::INFO, outputs[0].first);
- EXPECT_EQ("Exception test", outputs[0].second);
-}
-
}
diff --git a/src/lib/server_common/portconfig.cc b/src/lib/server_common/portconfig.cc
index c60e18d..379a0a1 100644
--- a/src/lib/server_common/portconfig.cc
+++ b/src/lib/server_common/portconfig.cc
@@ -114,12 +114,12 @@ installListenAddresses(const AddressList& newAddresses,
* user will get error info, command control can be used to set new
* address. So we just catch the exception without propagating outside
*/
- LOG_ERROR(logger, SRVCOMM_ADDRESS_FAIL).arg(e);
+ LOG_ERROR(logger, SRVCOMM_ADDRESS_FAIL).arg(e.what());
try {
setAddresses(service, addressStore);
}
catch (const exception& e2) {
- LOG_FATAL(logger, SRVCOMM_ADDRESS_UNRECOVERABLE).arg(e2);
+ LOG_FATAL(logger, SRVCOMM_ADDRESS_UNRECOVERABLE).arg(e2.what());
}
//Anyway the new configure has problem, we need to notify configure
//manager the new configure doesn't work
More information about the bind10-changes
mailing list