Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW
Refs: #4834
Change-Id: I6c536cd321fba62d397bf8520f51d2dbba73d908
diff --git a/src/daemon/name-server.cpp b/src/daemon/name-server.cpp
index c1d3bfa..4e40b17 100644
--- a/src/daemon/name-server.cpp
+++ b/src/daemon/name-server.cpp
@@ -44,7 +44,7 @@
if (m_zone.getId() == 0) {
NDNS_LOG_FATAL("m_zone does not exist: " << zoneName);
- BOOST_THROW_EXCEPTION(Error("Zone " + zoneName.toUri() + " does not exist in the database"));
+ NDN_THROW(Error("Zone " + zoneName.toUri() + " does not exist in the database"));
}
m_ndnsPrefix.append(ndns::label::NDNS_ITERATIVE_QUERY);
@@ -101,7 +101,7 @@
doe.setType(label::DOE_RR_TYPE);
if (!m_dbMgr.findLowerBound(doe)) {
NDNS_LOG_FATAL("fail to find DoE record of zone:" + m_zone.getName().toUri());
- BOOST_THROW_EXCEPTION(std::runtime_error("fail to find DoE record of zone:" + m_zone.getName().toUri()));
+ NDN_THROW(std::runtime_error("fail to find DoE record of zone:" + m_zone.getName().toUri()));
}
answer->setContent(doe.getData());
@@ -133,9 +133,9 @@
}
m_validator.validate(*data,
bind(&NameServer::doUpdate, this, interest.shared_from_this(), data),
- [] (const Data& data, const security::ValidationError& msg) {
+ [] (const Data&, const security::ValidationError&) {
NDNS_LOG_WARN("Ignoring update that did not pass the verification. "
- << "Check the root certificate");
+ "Check the root certificate");
});
}
}
@@ -144,8 +144,8 @@
NameServer::onRegisterFailed(const ndn::Name& prefix, const std::string& reason)
{
NDNS_LOG_FATAL("fail to register prefix=" << prefix << ". Due to: " << reason);
- BOOST_THROW_EXCEPTION(Error("zone " + m_zone.getName().toUri() + " register prefix: " +
- prefix.toUri() + " fails. due to: " + reason));
+ NDN_THROW(Error("zone " + m_zone.getName().toUri() + " register prefix: " +
+ prefix.toUri() + " fails. due to: " + reason));
}
void