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."));
   }
