diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index 691b40b..21949b3 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.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,
@@ -89,7 +89,7 @@
     m_socket.assign(m_pcap.getFd());
   }
   catch (const PcapHelper::Error& e) {
-    BOOST_THROW_EXCEPTION(Error(e.what()));
+    NDN_THROW_NESTED(Error(e.what()));
   }
   updateFilter();
 
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 7603343..4d4d295 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.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,
@@ -96,12 +96,12 @@
         const std::string& valueStr = value.get_value<std::string>();
         mcastConfig.group = ethernet::Address::fromString(valueStr);
         if (mcastConfig.group.isNull()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.ether.mcast_group: '" +
-                                valueStr + "' cannot be parsed as an Ethernet address"));
+          NDN_THROW(ConfigFile::Error("face_system.ether.mcast_group: '" +
+                                      valueStr + "' cannot be parsed as an Ethernet address"));
         }
         else if (!mcastConfig.group.isMulticast()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.ether.mcast_group: '" +
-                                valueStr + "' is not a multicast address"));
+          NDN_THROW(ConfigFile::Error("face_system.ether.mcast_group: '" +
+                                      valueStr + "' is not a multicast address"));
         }
       }
       else if (key == "mcast_ad_hoc") {
@@ -115,7 +115,7 @@
         mcastConfig.netifPredicate.parseBlacklist(value);
       }
       else {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.ether." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.ether." + key));
       }
     }
   }
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 412bcba..ee7193b 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.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,
@@ -55,7 +55,7 @@
     m_socket.assign(m_pcap.getFd());
   }
   catch (const PcapHelper::Error& e) {
-    BOOST_THROW_EXCEPTION(Error(e.what()));
+    NDN_THROW_NESTED(Error(e.what()));
   }
 
   m_netifStateConn = localEndpoint.onStateChanged.connect(
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 79880da..21685f3 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.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,
@@ -110,7 +110,7 @@
         context.generalConfig.wantCongestionMarking = ConfigFile::parseYesNo(pair, "face_system.general");
       }
       else {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.general." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.general." + key));
       }
     }
   }
@@ -150,7 +150,7 @@
     // const ConfigSection& subSection = pair.second;
 
     if (!seenSections.insert(sectionName).second) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error("Duplicate section face_system." + sectionName));
+      NDN_THROW(ConfigFile::Error("Duplicate section face_system." + sectionName));
     }
 
     if (sectionName == SECTION_GENERAL || sectionName == SECTION_NETDEVBOUND ||
@@ -158,7 +158,7 @@
       continue;
     }
 
-    BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system." + sectionName));
+    NDN_THROW(ConfigFile::Error("Unrecognized option face_system." + sectionName));
   }
 }
 
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index 7b248fb..d46356b 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.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,
@@ -188,7 +188,7 @@
   lp::Sequence txSeq = ++m_lastTxSeqNo;
   frag.set<lp::TxSequenceField>(txSeq);
   if (m_unackedFrags.size() > 0 && m_lastTxSeqNo == m_firstUnackedFrag->first) {
-    BOOST_THROW_EXCEPTION(std::length_error("TxSequence range exceeded"));
+    NDN_THROW(std::length_error("TxSequence range exceeded"));
   }
   return m_lastTxSeqNo;
 }
diff --git a/daemon/face/multicast-ethernet-transport.cpp b/daemon/face/multicast-ethernet-transport.cpp
index 91c25d4..2afb793 100644
--- a/daemon/face/multicast-ethernet-transport.cpp
+++ b/daemon/face/multicast-ethernet-transport.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,
@@ -144,7 +144,7 @@
   NFD_LOG_FACE_WARN("ioctl(SIOCADDMULTI) failed: " << std::strerror(errno));
 #endif
 
-  BOOST_THROW_EXCEPTION(Error("Failed to join multicast group"));
+  NDN_THROW(Error("Failed to join multicast group"));
 }
 
 } // namespace face
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index db12128..6e99a1c 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.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,
@@ -124,8 +124,7 @@
 #if defined(__linux__) && !defined(__ANDROID__)
   PrivilegeHelper::runElevated([=] {
     if (::setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, ifname.data(), ifname.size() + 1) < 0) {
-      BOOST_THROW_EXCEPTION(MulticastUdpTransport::Error("Cannot bind multicast rx socket to " +
-                                                         ifname + ": " + std::strerror(errno)));
+      NDN_THROW_ERRNO(MulticastUdpTransport::Error("Cannot bind multicast rx socket to " + ifname));
     }
   });
 #endif
diff --git a/daemon/face/netdev-bound.cpp b/daemon/face/netdev-bound.cpp
index a47bd43..5ed975d 100644
--- a/daemon/face/netdev-bound.cpp
+++ b/daemon/face/netdev-bound.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,
@@ -53,8 +53,7 @@
         rules.push_back(parseRule(ruleIndex++, value));
       }
       else {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error(
-          "Unrecognized option face_system.netdev_bound." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.netdev_bound." + key));
       }
     }
   }
@@ -70,8 +69,8 @@
     for (const FaceUri& remote : rule.remotes) {
       std::string devScheme = remote.getScheme() + "+dev";
       if (!m_faceSystem.hasFactoryForScheme(devScheme)) {
-        BOOST_THROW_EXCEPTION(RuleParseError(
-          i, "scheme " + devScheme + " for " + remote.toString() + " is unavailable"));
+        NDN_THROW(RuleParseError(i, "scheme '" + devScheme + "' for " +
+                                 remote.toString() + " is unavailable"));
       }
     }
   }
@@ -102,44 +101,44 @@
       try {
         rule.remotes.emplace_back(value.get_value<std::string>());
       }
-      catch (const FaceUri::Error& ex) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "invalid remote FaceUri", ex.what()));
+      catch (const FaceUri::Error&) {
+        NDN_THROW_NESTED(RuleParseError(index, "invalid remote FaceUri"));
       }
       if (!rule.remotes.back().isCanonical()) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "remote FaceUri is not canonical"));
+        NDN_THROW(RuleParseError(index, "remote FaceUri is not canonical"));
       }
     }
     else if (key == "whitelist") {
       if (hasWhitelist) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "duplicate whitelist"));
+        NDN_THROW(RuleParseError(index, "duplicate whitelist"));
       }
       try {
         rule.netifPredicate.parseWhitelist(value);
       }
-      catch (const ConfigFile::Error& ex) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "invalid whitelist", ex.what()));
+      catch (const ConfigFile::Error&) {
+        NDN_THROW_NESTED(RuleParseError(index, "invalid whitelist"));
       }
       hasWhitelist = true;
     }
     else if (key == "blacklist") {
       if (hasBlacklist) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "duplicate blacklist"));
+        NDN_THROW(RuleParseError(index, "duplicate blacklist"));
       }
       try {
         rule.netifPredicate.parseBlacklist(value);
       }
-      catch (const ConfigFile::Error& ex) {
-        BOOST_THROW_EXCEPTION(RuleParseError(index, "invalid blacklist", ex.what()));
+      catch (const ConfigFile::Error&) {
+        NDN_THROW_NESTED(RuleParseError(index, "invalid blacklist"));
       }
       hasBlacklist = true;
     }
     else {
-      BOOST_THROW_EXCEPTION(RuleParseError(index, "unrecognized option " + key));
+      NDN_THROW(RuleParseError(index, "unrecognized option " + key));
     }
   }
 
   if (rule.remotes.empty()) {
-    BOOST_THROW_EXCEPTION(RuleParseError(index, "remote FaceUri is missing"));
+    NDN_THROW(RuleParseError(index, "remote FaceUri is missing"));
   }
 
   ///\todo #3521 for each remote, check that there is a factory providing scheme+dev scheme
diff --git a/daemon/face/netdev-bound.hpp b/daemon/face/netdev-bound.hpp
index 17a6ce8..6297afd 100644
--- a/daemon/face/netdev-bound.hpp
+++ b/daemon/face/netdev-bound.hpp
@@ -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,
@@ -48,11 +48,6 @@
     {
     }
 
-    RuleParseError(int index, std::string msg, const char* innerMsg)
-      : RuleParseError(index, msg + " - " + innerMsg)
-    {
-    }
-
   public:
     int index;
     std::string msg;
diff --git a/daemon/face/pcap-helper.cpp b/daemon/face/pcap-helper.cpp
index 072f75e..4b474e6 100644
--- a/daemon/face/pcap-helper.cpp
+++ b/daemon/face/pcap-helper.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,
@@ -41,14 +41,14 @@
   char errbuf[PCAP_ERRBUF_SIZE] = {};
   m_pcap = pcap_create(interfaceName.data(), errbuf);
   if (!m_pcap)
-    BOOST_THROW_EXCEPTION(Error("pcap_create: " + std::string(errbuf)));
+    NDN_THROW(Error("pcap_create: " + std::string(errbuf)));
 
   // Enable "immediate mode", effectively disabling any read buffering in the kernel.
   // This corresponds to the BIOCIMMEDIATE ioctl on BSD-like systems (including macOS)
   // where libpcap uses a BPF device. On Linux this forces libpcap not to use TPACKET_V3,
   // even if the kernel supports it, thus preventing bug #1511.
   if (pcap_set_immediate_mode(m_pcap, 1) < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_set_immediate_mode failed"));
+    NDN_THROW(Error("pcap_set_immediate_mode failed"));
 }
 
 PcapHelper::~PcapHelper()
@@ -61,13 +61,13 @@
 {
   int ret = pcap_activate(m_pcap);
   if (ret < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_activate: " + std::string(pcap_statustostr(ret))));
+    NDN_THROW(Error("pcap_activate: " + std::string(pcap_statustostr(ret))));
 
   if (pcap_set_datalink(m_pcap, dlt) < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_set_datalink: " + getLastError()));
+    NDN_THROW(Error("pcap_set_datalink: " + getLastError()));
 
   if (pcap_setdirection(m_pcap, PCAP_D_IN) < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_setdirection: " + getLastError()));
+    NDN_THROW(Error("pcap_setdirection: " + getLastError()));
 }
 
 void
@@ -84,7 +84,7 @@
 {
   int fd = pcap_get_selectable_fd(m_pcap);
   if (fd < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_get_selectable_fd failed"));
+    NDN_THROW(Error("pcap_get_selectable_fd failed"));
 
   // we need to duplicate the fd, otherwise both pcap_close() and the
   // caller may attempt to close the same fd and one of them will fail
@@ -102,7 +102,7 @@
 {
   pcap_stat ps{};
   if (pcap_stats(m_pcap, &ps) < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_stats: " + getLastError()));
+    NDN_THROW(Error("pcap_stats: " + getLastError()));
 
   return ps.ps_drop;
 }
@@ -112,12 +112,12 @@
 {
   bpf_program prog;
   if (pcap_compile(m_pcap, &prog, filter, 1, PCAP_NETMASK_UNKNOWN) < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_compile: " + getLastError()));
+    NDN_THROW(Error("pcap_compile: " + getLastError()));
 
   int ret = pcap_setfilter(m_pcap, &prog);
   pcap_freecode(&prog);
   if (ret < 0)
-    BOOST_THROW_EXCEPTION(Error("pcap_setfilter: " + getLastError()));
+    NDN_THROW(Error("pcap_setfilter: " + getLastError()));
 }
 
 std::tuple<const uint8_t*, size_t, std::string>
diff --git a/daemon/face/protocol-factory.cpp b/daemon/face/protocol-factory.cpp
index cdb6cb1..5acb18f 100644
--- a/daemon/face/protocol-factory.cpp
+++ b/daemon/face/protocol-factory.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,
@@ -114,7 +114,7 @@
 ProtocolFactory::doCreateNetdevBoundFace(const FaceUri&,
                                          const shared_ptr<const ndn::net::NetworkInterface>&)
 {
-  BOOST_THROW_EXCEPTION(Error("This protocol factory does not support netdev-bound faces"));
+  NDN_THROW(Error("This protocol factory does not support netdev-bound faces"));
 }
 
 std::vector<shared_ptr<const Channel>>
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index d77b639..f45d786 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.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,
@@ -94,12 +94,12 @@
           local.parseBlacklist(localPair.second);
         }
         else {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.tcp.local." + localKey));
+          NDN_THROW(ConfigFile::Error("Unrecognized option face_system.tcp.local." + localKey));
         }
       }
     }
     else {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.tcp." + key));
+      NDN_THROW(ConfigFile::Error("Unrecognized option face_system.tcp." + key));
     }
   }
   if (!isLocalConfigured) {
@@ -107,7 +107,7 @@
   }
 
   if (!enableV4 && !enableV6) {
-    BOOST_THROW_EXCEPTION(ConfigFile::Error(
+    NDN_THROW(ConfigFile::Error(
       "IPv4 and IPv6 TCP channels have been disabled. Remove face_system.tcp section to disable "
       "TCP channels or enable at least one channel type."));
   }
diff --git a/daemon/face/transport.cpp b/daemon/face/transport.cpp
index c08990a..e93480f 100644
--- a/daemon/face/transport.cpp
+++ b/daemon/face/transport.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,
@@ -201,7 +201,7 @@
   }
 
   if (!isValid) {
-    BOOST_THROW_EXCEPTION(std::runtime_error("invalid state transition"));
+    NDN_THROW(std::runtime_error("Invalid state transition"));
   }
 
   NFD_LOG_FACE_INFO("setState " << m_state << " -> " << newState);
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 6c261fb..6730389 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.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,
@@ -124,12 +124,12 @@
         boost::system::error_code ec;
         mcastConfig.group.address(ip::address_v4::from_string(valueStr, ec));
         if (ec) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.udp.mcast_group: '" +
-                                valueStr + "' cannot be parsed as an IPv4 address"));
+          NDN_THROW(ConfigFile::Error("face_system.udp.mcast_group: '" +
+                                      valueStr + "' cannot be parsed as an IPv4 address"));
         }
         else if (!mcastConfig.group.address().is_multicast()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.udp.mcast_group: '" +
-                                valueStr + "' is not a multicast address"));
+          NDN_THROW(ConfigFile::Error("face_system.udp.mcast_group: '" +
+                                      valueStr + "' is not a multicast address"));
         }
       }
       else if (key == "mcast_port") {
@@ -140,12 +140,12 @@
         boost::system::error_code ec;
         mcastConfig.groupV6.address(ip::address_v6::from_string(valueStr, ec));
         if (ec) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.udp.mcast_group_v6: '" +
-                                valueStr + "' cannot be parsed as an IPv6 address"));
+          NDN_THROW(ConfigFile::Error("face_system.udp.mcast_group_v6: '" +
+                                      valueStr + "' cannot be parsed as an IPv6 address"));
         }
         else if (!mcastConfig.groupV6.address().is_multicast()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("face_system.udp.mcast_group_v6: '" +
-                                valueStr + "' is not a multicast address"));
+          NDN_THROW(ConfigFile::Error("face_system.udp.mcast_group_v6: '" +
+                                      valueStr + "' is not a multicast address"));
         }
       }
       else if (key == "mcast_port_v6") {
@@ -162,12 +162,12 @@
         mcastConfig.netifPredicate.parseBlacklist(value);
       }
       else {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.udp." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.udp." + key));
       }
     }
 
     if (!enableV4 && !enableV6 && !mcastConfig.isEnabled) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
+      NDN_THROW(ConfigFile::Error(
         "IPv4 and IPv6 UDP channels and UDP multicast have been disabled. "
         "Remove face_system.udp section to disable UDP channels or enable at least one of them."));
     }
@@ -298,9 +298,8 @@
 
   // check if the endpoint is already used by a multicast face
   if (m_mcastFaces.find(localEndpoint) != m_mcastFaces.end()) {
-    BOOST_THROW_EXCEPTION(Error("Cannot create UDP channel on " +
-                                boost::lexical_cast<std::string>(localEndpoint) +
-                                ", endpoint already allocated for a UDP multicast face"));
+    NDN_THROW(Error("Cannot create UDP channel on " + boost::lexical_cast<std::string>(localEndpoint) +
+                    ", endpoint already allocated to a UDP multicast face"));
   }
 
   auto channel = std::make_shared<UdpChannel>(localEndpoint, idleTimeout, m_wantCongestionMarking);
@@ -338,16 +337,14 @@
     if (it->second->getRemoteUri() == FaceUri(mcastEp))
       return it->second;
     else
-      BOOST_THROW_EXCEPTION(Error("Cannot create UDP multicast face on " +
-                                  boost::lexical_cast<std::string>(localEp) +
-                                  ", endpoint already allocated for a different UDP multicast face"));
+      NDN_THROW(Error("Cannot create UDP multicast face on " + boost::lexical_cast<std::string>(localEp) +
+                      ", endpoint already allocated to a different UDP multicast face"));
   }
 
   // check if the local endpoint is already used by a unicast channel
   if (m_channels.find(localEp) != m_channels.end()) {
-    BOOST_THROW_EXCEPTION(Error("Cannot create UDP multicast face on " +
-                                boost::lexical_cast<std::string>(localEp) +
-                                ", endpoint already allocated for a UDP channel"));
+    NDN_THROW(Error("Cannot create UDP multicast face on " + boost::lexical_cast<std::string>(localEp) +
+                    ", endpoint already allocated to a UDP channel"));
   }
 
   ip::udp::socket rxSock(getGlobalIoService());
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index 8c58c55..172f797 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.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,8 +82,7 @@
     NFD_LOG_CHAN_TRACE("connect() on existing socket file returned: " << error.message());
     if (!error) {
       // someone answered, leave the socket alone
-      BOOST_THROW_EXCEPTION(Error("Socket file at " + m_endpoint.path()
-                                  + " belongs to another NFD process"));
+      NDN_THROW(Error("Socket file at " + m_endpoint.path() + " belongs to another NFD process"));
     }
     else if (error == boost::asio::error::connection_refused ||
              error == boost::asio::error::timed_out) {
@@ -94,7 +93,7 @@
     }
   }
   else if (type != fs::file_not_found) {
-    BOOST_THROW_EXCEPTION(Error(m_endpoint.path() + " already exists and is not a socket file"));
+    NDN_THROW(Error(m_endpoint.path() + " already exists and is not a socket file"));
   }
 
   m_acceptor.open();
@@ -102,7 +101,7 @@
   m_acceptor.listen(backlog);
 
   if (::chmod(m_endpoint.path().data(), 0666) < 0) {
-    BOOST_THROW_EXCEPTION(Error("chmod(" + m_endpoint.path() + ") failed: " + std::strerror(errno)));
+    NDN_THROW_ERRNO(Error("Failed to chmod " + m_endpoint.path()));
   }
 
   accept(onFaceCreated, onAcceptFailed);
diff --git a/daemon/face/unix-stream-factory.cpp b/daemon/face/unix-stream-factory.cpp
index 211203a..faa406c 100644
--- a/daemon/face/unix-stream-factory.cpp
+++ b/daemon/face/unix-stream-factory.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,
@@ -68,7 +68,7 @@
       path = value.get_value<std::string>();
     }
     else {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.unix." + key));
+      NDN_THROW(ConfigFile::Error("Unrecognized option face_system.unix." + key));
     }
   }
 
diff --git a/daemon/face/websocket-factory.cpp b/daemon/face/websocket-factory.cpp
index e3d8d57..49e5740 100644
--- a/daemon/face/websocket-factory.cpp
+++ b/daemon/face/websocket-factory.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,
@@ -75,13 +75,13 @@
         enableV6 = ConfigFile::parseYesNo(pair, "face_system.websocket");
       }
       else {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Unrecognized option face_system.websocket." + key));
+        NDN_THROW(ConfigFile::Error("Unrecognized option face_system.websocket." + key));
       }
     }
   }
 
   if (!enableV4 && !enableV6) {
-    BOOST_THROW_EXCEPTION(ConfigFile::Error(
+    NDN_THROW(ConfigFile::Error(
       "IPv4 and IPv6 WebSocket channels have been disabled. Remove face_system.websocket section "
       "to disable WebSocket channels or enable at least one channel type."));
   }
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 31e2b91..13560a9 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -39,10 +39,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("AccessStrategy does not accept parameters"));
+    NDN_THROW(std::invalid_argument("AccessStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "AccessStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index f743e06..6302020 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.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,
@@ -85,7 +85,7 @@
     m_lastInterestName = interestName;
   }
   else {
-    BOOST_THROW_EXCEPTION(FaceInfo::Error("Tried to schedule a timeout for a face that already has a timeout scheduled."));
+    NDN_THROW(FaceInfo::Error("Tried to schedule a timeout for a face that already has a timeout scheduled"));
   }
 }
 
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 8a81a77..dd2b537 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -197,9 +197,8 @@
     m_probingInterval = time::milliseconds(probingInterval);
   }
   else {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("Probing interval should be >= "
-                                                + to_string(MIN_PROBING_INTERVAL.count())
-                                                + " milliseconds"));
+    NDN_THROW(std::invalid_argument("Probing interval should be >= " +
+                                    to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
   }
 }
 
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index d47649d..67d6944 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.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,
@@ -52,7 +52,7 @@
   }
 
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "AsfStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
@@ -75,7 +75,7 @@
     std::string parsedStr(reinterpret_cast<const char*>(component.value()), component.value_size());
     auto n = parsedStr.find("~");
     if (n == std::string::npos) {
-      BOOST_THROW_EXCEPTION(std::invalid_argument("Format is <parameter>~<value>"));
+      NDN_THROW(std::invalid_argument("Format is <parameter>~<value>"));
     }
 
     auto f = parsedStr.substr(0, n);
@@ -87,7 +87,7 @@
       m_maxSilentTimeouts = getParamValue(f, s);
     }
     else {
-      BOOST_THROW_EXCEPTION(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
+      NDN_THROW(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
     }
   }
 }
@@ -97,12 +97,12 @@
 {
   try {
     if (!value.empty() && value[0] == '-')
-      BOOST_THROW_EXCEPTION(boost::bad_lexical_cast());
+      NDN_THROW(boost::bad_lexical_cast());
 
     return boost::lexical_cast<uint64_t>(value);
   }
   catch (const boost::bad_lexical_cast&) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("Value of " + param + " must be a non-negative integer"));
+    NDN_THROW(std::invalid_argument("Value of " + param + " must be a non-negative integer"));
   }
 }
 
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index e4462e4..dbf410b 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.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,
@@ -63,10 +63,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy does not accept parameters"));
+    NDN_THROW(std::invalid_argument("BestRouteStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "BestRouteStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 0ab6b25..03f27dc 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.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,
@@ -45,10 +45,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy2 does not accept parameters"));
+    NDN_THROW(std::invalid_argument("BestRouteStrategy2 does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "BestRouteStrategy2 does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 6a05356..71fa7c1 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.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,
@@ -46,10 +46,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("MulticastStrategy does not accept parameters"));
+    NDN_THROW(std::invalid_argument("MulticastStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "MulticastStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index df9a41b..9a16897 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -42,10 +42,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("NccStrategy does not accept parameters"));
+    NDN_THROW(std::invalid_argument("NccStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "NccStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index 5a43a26..174dca4 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -49,10 +49,10 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
+    NDN_THROW(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument(
+    NDN_THROW(std::invalid_argument(
       "SelfLearningStrategy does not support version " + to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index 0b6346b..913c74f 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.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,
@@ -124,14 +124,13 @@
   }
 
   if (section.empty()) {
-    BOOST_THROW_EXCEPTION(ConfigFile::Error("'authorize' is missing under 'authorizations'"));
+    NDN_THROW(ConfigFile::Error("'authorize' is missing under 'authorizations'"));
   }
 
   int authSectionIndex = 0;
   for (const auto& kv : section) {
     if (kv.first != "authorize") {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "'" + kv.first + "' section is not permitted under 'authorizations'"));
+      NDN_THROW(ConfigFile::Error("'" + kv.first + "' section is not permitted under 'authorizations'"));
     }
     const ConfigSection& authSection = kv.second;
 
@@ -140,8 +139,8 @@
       certfile = authSection.get<std::string>("certfile");
     }
     catch (const boost::property_tree::ptree_error&) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "'certfile' is missing under authorize[" + to_string(authSectionIndex) + "]"));
+      NDN_THROW(ConfigFile::Error("'certfile' is missing under authorize[" +
+                                  to_string(authSectionIndex) + "]"));
     }
 
     bool isAny = false;
@@ -156,9 +155,8 @@
       path certfilePath = absolute(certfile, path(filename).parent_path());
       cert = ndn::io::load<sec2::Certificate>(certfilePath.string());
       if (cert == nullptr) {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error(
-          "cannot load certfile " + certfilePath.string() +
-          " for authorize[" + to_string(authSectionIndex) + "]"));
+        NDN_THROW(ConfigFile::Error("cannot load certfile " + certfilePath.string() +
+                                    " for authorize[" + to_string(authSectionIndex) + "]"));
       }
     }
 
@@ -167,8 +165,8 @@
       privSection = &authSection.get_child("privileges");
     }
     catch (const boost::property_tree::ptree_error&) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "'privileges' is missing under authorize[" + to_string(authSectionIndex) + "]"));
+      NDN_THROW(ConfigFile::Error("'privileges' is missing under authorize[" +
+                                  to_string(authSectionIndex) + "]"));
     }
 
     if (privSection->empty()) {
@@ -178,8 +176,8 @@
       const std::string& module = kv.first;
       auto found = m_validators.find(module);
       if (found == m_validators.end()) {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error(
-          "unknown module '" + module + "' under authorize[" + to_string(authSectionIndex) + "]"));
+        NDN_THROW(ConfigFile::Error("unknown module '" + module +
+                                    "' under authorize[" + to_string(authSectionIndex) + "]"));
       }
 
       if (isDryRun) {
@@ -195,8 +193,7 @@
         const Name& keyName = cert->getKeyName();
         sec2::Certificate certCopy = *cert;
         found->second->loadAnchor(certfile, std::move(certCopy));
-        NFD_LOG_INFO("authorize module=" << module << " signer=" << keyName <<
-                     " certfile=" << certfile);
+        NFD_LOG_INFO("authorize module=" << module << " signer=" << keyName << " certfile=" << certfile);
       }
     }
 
diff --git a/daemon/mgmt/general-config-section.cpp b/daemon/mgmt/general-config-section.cpp
index 6ed3af1..732074b 100644
--- a/daemon/mgmt/general-config-section.cpp
+++ b/daemon/mgmt/general-config-section.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,
@@ -45,25 +45,23 @@
     if (i.first == "user") {
       try {
         user = i.second.get_value<std::string>("user");
-
         if (user.empty()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("Invalid value for \"user\" in \"general\" section"));
+          NDN_THROW(ConfigFile::Error("Invalid value for 'user' in section 'general'"));
         }
       }
       catch (const boost::property_tree::ptree_error&) {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Invalid value for \"user\" in \"general\" section"));
+        NDN_THROW(ConfigFile::Error("Invalid value for 'user' in section 'general'"));
       }
     }
     else if (i.first == "group") {
       try {
         group = i.second.get_value<std::string>("group");
-
         if (group.empty()) {
-          BOOST_THROW_EXCEPTION(ConfigFile::Error("Invalid value for \"group\" in \"general\" section"));
+          NDN_THROW(ConfigFile::Error("Invalid value for 'group' in section 'general'"));
         }
       }
       catch (const boost::property_tree::ptree_error&) {
-        BOOST_THROW_EXCEPTION(ConfigFile::Error("Invalid value for \"group\" in \"general\" section"));
+        NDN_THROW(ConfigFile::Error("Invalid value for 'group' in section 'general'"));
       }
     }
   }
diff --git a/daemon/mgmt/tables-config-section.cpp b/daemon/mgmt/tables-config-section.cpp
index 678b6e5..e5383a4 100644
--- a/daemon/mgmt/tables-config-section.cpp
+++ b/daemon/mgmt/tables-config-section.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  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,
@@ -72,8 +72,7 @@
     std::string policyName = csPolicyNode->get_value<std::string>();
     csPolicy = cs::Policy::create(policyName);
     if (csPolicy == nullptr) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "Unknown cs_policy \"" + policyName + "\" in \"tables\" section"));
+      NDN_THROW(ConfigFile::Error("Unknown cs_policy '" + policyName + "' in section 'tables'"));
     }
   }
 
@@ -83,8 +82,7 @@
     std::string policyName = unsolicitedDataPolicyNode->get_value<std::string>();
     unsolicitedDataPolicy = fw::UnsolicitedDataPolicy::create(policyName);
     if (unsolicitedDataPolicy == nullptr) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "Unknown cs_unsolicited_policy \"" + policyName + "\" in \"tables\" section"));
+      NDN_THROW(ConfigFile::Error("Unknown cs_unsolicited_policy '" + policyName + "' in section 'tables'"));
     }
   }
   else {
@@ -127,15 +125,14 @@
     Name strategy(prefixAndStrategy.second.get_value<std::string>());
 
     if (!Strategy::canCreate(strategy)) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "Unknown strategy \"" + prefixAndStrategy.second.get_value<std::string>() +
-        "\" for prefix \"" + prefix.toUri() + "\" in \"strategy_choice\" section"));
+      NDN_THROW(ConfigFile::Error(
+        "Unknown strategy '" + prefixAndStrategy.second.get_value<std::string>() +
+        "' for prefix '" + prefix.toUri() + "' in section 'strategy_choice'"));
     }
 
     if (!choices.emplace(prefix, strategy).second) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "Duplicate strategy choice for prefix \"" + prefix.toUri() +
-        "\" in \"strategy_choice\" section"));
+      NDN_THROW(ConfigFile::Error(
+        "Duplicate strategy choice for prefix '" + prefix.toUri() + "' in section 'strategy_choice'"));
     }
   }
 
@@ -146,9 +143,9 @@
   StrategyChoice& sc = m_forwarder.getStrategyChoice();
   for (const auto& prefixAndStrategy : choices) {
     if (!sc.insert(prefixAndStrategy.first, prefixAndStrategy.second)) {
-      BOOST_THROW_EXCEPTION(ConfigFile::Error(
-        "Failed to set strategy \"" + prefixAndStrategy.second.toUri() + "\" for "
-        "prefix \"" + prefixAndStrategy.first.toUri() + "\" in \"strategy_choicev\""));
+      NDN_THROW(ConfigFile::Error(
+        "Failed to set strategy '" + prefixAndStrategy.second.toUri() + "' for prefix '" +
+        prefixAndStrategy.first.toUri() + "' in section 'strategy_choice'"));
     }
   }
   ///\todo redesign so that strategy parameter errors can be catched during dry-run
@@ -161,11 +158,10 @@
     return;
   }
 
-  NetworkRegionTable& nrt = m_forwarder.getNetworkRegionTable();
+  auto& nrt = m_forwarder.getNetworkRegionTable();
   nrt.clear();
   for (const auto& pair : section) {
-    Name region(pair.first);
-    nrt.insert(region);
+    nrt.insert(Name(pair.first));
   }
 }
 
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index 144e68e..a5bd9f8 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.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,
@@ -51,7 +51,7 @@
   , m_adjustCapacityInterval(m_lifetime)
 {
   if (m_lifetime < MIN_LIFETIME) {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("lifetime is less than MIN_LIFETIME"));
+    NDN_THROW(std::invalid_argument("lifetime is less than MIN_LIFETIME"));
   }
 
   for (size_t i = 0; i < EXPECTED_MARK_COUNT; ++i) {
