Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW
Refs: #4834
Change-Id: If2455e1830f310beea434ffb455d960e11c4c2ed
diff --git a/rib/service.cpp b/rib/service.cpp
index a91a93e..35c092d 100644
--- a/rib/service.cpp
+++ b/rib/service.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -82,7 +82,7 @@
return make_shared<ndn::TcpTransport>("localhost", port);
}
else {
- BOOST_THROW_EXCEPTION(ConfigFile::Error("No transport is available to communicate with NFD"));
+ NDN_THROW(ConfigFile::Error("No transport is available to communicate with NFD"));
}
}
@@ -114,10 +114,10 @@
, m_ribManager(m_rib, m_face, m_keyChain, m_nfdController, m_dispatcher, m_scheduler)
{
if (s_instance != nullptr) {
- BOOST_THROW_EXCEPTION(std::logic_error("RIB service cannot be instantiated more than once"));
+ NDN_THROW(std::logic_error("RIB service cannot be instantiated more than once"));
}
if (&getGlobalIoService() != &getRibIoService()) {
- BOOST_THROW_EXCEPTION(std::logic_error("RIB service must run on RIB thread"));
+ NDN_THROW(std::logic_error("RIB service must run on RIB thread"));
}
s_instance = this;
@@ -139,10 +139,10 @@
Service::get()
{
if (s_instance == nullptr) {
- BOOST_THROW_EXCEPTION(std::logic_error("RIB service is not instantiated"));
+ NDN_THROW(std::logic_error("RIB service is not instantiated"));
}
if (&getGlobalIoService() != &getRibIoService()) {
- BOOST_THROW_EXCEPTION(std::logic_error("Must get RIB service on RIB thread"));
+ NDN_THROW(std::logic_error("Must get RIB service on RIB thread"));
}
return *s_instance;
}
@@ -175,7 +175,7 @@
ConfigFile::parseYesNo(item, CFG_SECTION + "." + CFG_READVERTISE_NLSR);
}
else {
- BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option " + CFG_SECTION + "." + key));
+ NDN_THROW(ConfigFile::Error("Unrecognized option " + CFG_SECTION + "." + key));
}
}
}
@@ -228,7 +228,7 @@
wantReadvertiseNlsr = ConfigFile::parseYesNo(item, CFG_SECTION + "." + CFG_READVERTISE_NLSR);
}
else {
- BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option " + CFG_SECTION + "." + key));
+ NDN_THROW(ConfigFile::Error("Unrecognized option " + CFG_SECTION + "." + key));
}
}