Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW

Refs: #4834
Change-Id: I6c536cd321fba62d397bf8520f51d2dbba73d908
diff --git a/tools/ndns-add-rr.cpp b/tools/ndns-add-rr.cpp
index 605a355..40ccdb2 100644
--- a/tools/ndns-add-rr.cpp
+++ b/tools/ndns-add-rr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,12 +23,12 @@
 #include "mgmt/management-tool.hpp"
 #include "util/util.hpp"
 
-#include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/split.hpp>
 #include <boost/lexical_cast.hpp>
+#include <boost/program_options.hpp>
 
-#include <string>
+#include <iostream>
 
 NDNS_LOG_INIT(AddRrTool);
 
diff --git a/tools/ndns-create-zone.cpp b/tools/ndns-create-zone.cpp
index e20b200..1238d4e 100644
--- a/tools/ndns-create-zone.cpp
+++ b/tools/ndns-create-zone.cpp
@@ -23,8 +23,8 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
+#include <iostream>
 
 NDNS_LOG_INIT(NdnsCreateZone);
 
diff --git a/tools/ndns-daemon.cpp b/tools/ndns-daemon.cpp
index 2f71a45..d199e29 100644
--- a/tools/ndns-daemon.cpp
+++ b/tools/ndns-daemon.cpp
@@ -27,9 +27,10 @@
 #include <ndn-cxx/security/key-chain.hpp>
 
 #include <boost/asio/io_service.hpp>
-#include <boost/filesystem.hpp>
 #include <boost/program_options.hpp>
 
+#include <iostream>
+
 NDNS_LOG_INIT(NdnsDaemon);
 
 namespace ndn {
@@ -40,7 +41,7 @@
  * @note NdnsDaemon allows multiple name servers hosted by the same daemon, and they
  * share same KeyChain, DbMgr, Validator and Face
  */
-class NdnsDaemon : noncopyable
+class NdnsDaemon : boost::noncopyable
 {
 public:
   DEFINE_ERROR(Error, std::runtime_error);
@@ -59,7 +60,7 @@
   processZonesSection(const ndn::ndns::ConfigSection& section)
   {
     if (section.begin() == section.end()) {
-      BOOST_THROW_EXCEPTION(Error("zones section is empty"));
+      NDN_THROW(Error("zones section is empty"));
     }
 
     std::string dbFile = getDefaultDatabaseFile();
@@ -87,7 +88,7 @@
         }
         catch (const std::exception&) {
           NDNS_LOG_ERROR("Required `name' attribute missing in `zone' section");
-          BOOST_THROW_EXCEPTION(Error("Required `name' attribute missing in `zone' section"));
+          NDN_THROW(Error("Required `name' attribute missing in `zone' section"));
         }
         try {
           cert = option.second.get<Name>("cert");
@@ -104,14 +105,14 @@
           }
           catch (const std::exception& e) {
             NDNS_LOG_ERROR("Identity " << name << " does not have a default certificate: " << e.what());
-            BOOST_THROW_EXCEPTION(Error("identity does not have default certificate"));
+            NDN_THROW(Error("identity does not have default certificate"));
           }
         }
         else {
           try {
             CertHelper::getCertificate(m_keyChain, name, cert);
           } catch (const std::exception&) {
-            BOOST_THROW_EXCEPTION(Error("Certificate `" + cert.toUri() + "` does not exist in the KeyChain"));
+            NDN_THROW(Error("Certificate `" + cert.toUri() + "` does not exist in the KeyChain"));
           }
         }
         NDNS_LOG_TRACE("name = " << name << " cert = " << cert);
diff --git a/tools/ndns-delete-zone.cpp b/tools/ndns-delete-zone.cpp
index 2cefccc..3e28840 100644
--- a/tools/ndns-delete-zone.cpp
+++ b/tools/ndns-delete-zone.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,8 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
+#include <iostream>
 
 int
 main(int argc, char* argv[])
diff --git a/tools/ndns-dig.cpp b/tools/ndns-dig.cpp
index 5cb6a40..88340d9 100644
--- a/tools/ndns-dig.cpp
+++ b/tools/ndns-dig.cpp
@@ -25,17 +25,14 @@
 #include "validator/validator.hpp"
 #include "util/util.hpp"
 
-#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/face.hpp>
-#include <boost/program_options.hpp>
-#include <boost/asio.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 
-#include <iostream>
-#include <memory>
-#include <string>
+#include <boost/asio/io_service.hpp>
+#include <boost/program_options.hpp>
+
 #include <fstream>
+#include <iostream>
 
 NDNS_LOG_INIT(Dig);
 
diff --git a/tools/ndns-export-certificate.cpp b/tools/ndns-export-certificate.cpp
index f3d7b8e..d0cb958 100644
--- a/tools/ndns-export-certificate.cpp
+++ b/tools/ndns-export-certificate.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,8 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
+#include <iostream>
 
 int
 main(int argc, char* argv[])
diff --git a/tools/ndns-get-rr.cpp b/tools/ndns-get-rr.cpp
index dc40c37..8b8377b 100644
--- a/tools/ndns-get-rr.cpp
+++ b/tools/ndns-get-rr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,8 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
+#include <iostream>
 
 int
 main(int argc, char* argv[])
diff --git a/tools/ndns-list-all-zones.cpp b/tools/ndns-list-all-zones.cpp
index 676815d..3801f35 100644
--- a/tools/ndns-list-all-zones.cpp
+++ b/tools/ndns-list-all-zones.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,7 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
 #include <iostream>
 
 int
diff --git a/tools/ndns-list-zone.cpp b/tools/ndns-list-zone.cpp
index 840997e..7e5ec89 100644
--- a/tools/ndns-list-zone.cpp
+++ b/tools/ndns-list-zone.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,7 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
 #include <iostream>
 
 int
diff --git a/tools/ndns-remove-rr.cpp b/tools/ndns-remove-rr.cpp
index dfb072c..8a7f05c 100644
--- a/tools/ndns-remove-rr.cpp
+++ b/tools/ndns-remove-rr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,8 +23,8 @@
 #include "util/util.hpp"
 
 #include <boost/program_options.hpp>
-#include <boost/filesystem.hpp>
-#include <string>
+
+#include <iostream>
 
 int
 main(int argc, char* argv[])
diff --git a/tools/ndns-update.cpp b/tools/ndns-update.cpp
index b810109..9c23a5b 100644
--- a/tools/ndns-update.cpp
+++ b/tools/ndns-update.cpp
@@ -35,12 +35,11 @@
 #include <ndn-cxx/util/regex.hpp>
 #include <ndn-cxx/encoding/block.hpp>
 #include <ndn-cxx/encoding/block-helpers.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/program_options.hpp>
-#include <boost/asio.hpp>
-#include <boost/filesystem.hpp>
 
-#include <string>
+#include <boost/asio/io_service.hpp>
+#include <boost/program_options.hpp>
+
+#include <iostream>
 #include <tuple>
 
 namespace ndn {
@@ -48,7 +47,7 @@
 
 NDNS_LOG_INIT(NdnsUpdate);
 
-class NdnsUpdate : noncopyable
+class NdnsUpdate : boost::noncopyable
 {
 public:
   NdnsUpdate(const Name& zone, const shared_ptr<Data>& update, Face& face)