Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW

Refs: #4834
Change-Id: I6c536cd321fba62d397bf8520f51d2dbba73d908
diff --git a/src/clients/iterative-query-controller.cpp b/src/clients/iterative-query-controller.cpp
index b40ba9b..ccb9451 100644
--- a/src/clients/iterative-query-controller.cpp
+++ b/src/clients/iterative-query-controller.cpp
@@ -19,7 +19,8 @@
 
 #include "iterative-query-controller.hpp"
 #include "logger.hpp"
-#include <iostream>
+
+#include <sstream>
 
 namespace ndn {
 namespace ndns {
@@ -113,7 +114,7 @@
         oss << "In onDataValidated, absence of record can not be infered from DoE.";
         oss << " Last query:" << m_lastLabelType << " ";
         oss << *this;
-        BOOST_THROW_EXCEPTION(std::runtime_error(oss.str()));
+        NDN_THROW(std::runtime_error(oss.str()));
       }
     }
     else if (contentType == NDNS_LINK) {
@@ -255,8 +256,7 @@
     std::ostringstream oss;
     oss << *this;
     NDNS_LOG_WARN("unexpected state: " << oss.str());
-    BOOST_THROW_EXCEPTION(std::runtime_error("call makeLatestInterest() unexpected: "
-                                             + oss.str()));
+    NDN_THROW(std::runtime_error("call makeLatestInterest() unexpected: " + oss.str()));
   }
 
   m_lastLabelType = Name(query.getRrLabel()).append(query.getRrType());
diff --git a/src/clients/iterative-query-controller.hpp b/src/clients/iterative-query-controller.hpp
index cee2976..48c0871 100644
--- a/src/clients/iterative-query-controller.hpp
+++ b/src/clients/iterative-query-controller.hpp
@@ -21,17 +21,12 @@
 #define NDNS_CLIENTS_ITERATIVE_QUERY_CONTROLLER_HPP
 
 #include "ndns-enum.hpp"
-#include "common.hpp"
-#include "query.hpp"
 #include "query-controller.hpp"
 #include "response.hpp"
 #include "validator/validator.hpp"
 
-#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/link.hpp>
-#include <ndn-cxx/name.hpp>
 #include <ndn-cxx/ims/in-memory-storage.hpp>
+#include <ndn-cxx/link.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -63,15 +58,15 @@
                            Face& face, security::Validator* validator = nullptr,
                            ndn::InMemoryStorage* cache = nullptr);
 
-  virtual void
-  start();
+  void
+  start() override;
 
   /**
    * @brief return false if the current status is not QUEYR_STEP_QUERY_NS
    * or QUERY_STEP_QUERY_RR
    */
-  virtual bool
-  hasEnded();
+  bool
+  hasEnded() override;
 
 NDNS_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   void
@@ -110,7 +105,7 @@
 
 public:
   void
-  setStartComponentIndex(size_t finished)
+  setStartComponentIndex(size_t finished) override
   {
     m_nFinishedComps = finished;
   }
diff --git a/src/clients/query-controller.cpp b/src/clients/query-controller.cpp
index 9cd3559..81914ba 100644
--- a/src/clients/query-controller.cpp
+++ b/src/clients/query-controller.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014, 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.
@@ -18,8 +18,6 @@
  */
 
 #include "query-controller.hpp"
-#include "logger.hpp"
-#include <iostream>
 
 namespace ndn {
 namespace ndns {
@@ -46,5 +44,6 @@
 
   return os;
 }
+
 } // namespace ndns
 } // namespace ndn
diff --git a/src/clients/query-controller.hpp b/src/clients/query-controller.hpp
index 8a84645..a78b5df 100644
--- a/src/clients/query-controller.hpp
+++ b/src/clients/query-controller.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-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.
@@ -20,15 +20,14 @@
 #ifndef NDNS_CLIENTS_QUERY_CONTROLLER_HPP
 #define NDNS_CLIENTS_QUERY_CONTROLLER_HPP
 
+#include "common.hpp"
 #include "query.hpp"
 #include "response.hpp"
 
 #include <ndn-cxx/data.hpp>
 #include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/name.hpp>
 #include <ndn-cxx/face.hpp>
 
-
 namespace ndn {
 namespace ndns {
 
@@ -48,7 +47,7 @@
  * @brief a Query Controller interface
  *
  */
-class QueryController : noncopyable
+class QueryController : boost::noncopyable
 {
 public:
   QueryController(const Name& dstLabel, const name::Component& rrType,
diff --git a/src/clients/query.hpp b/src/clients/query.hpp
index 6f8222b..bd7ff25 100644
--- a/src/clients/query.hpp
+++ b/src/clients/query.hpp
@@ -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-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.
@@ -36,7 +36,7 @@
  *
  *      <zone> [<NDNS>|<NDNS-R>] <rrLabel> <rrType>
  */
-class Query : noncopyable
+class Query : boost::noncopyable
 {
 public:
   Query();
diff --git a/src/clients/response.cpp b/src/clients/response.cpp
index 3da172b..b183b1d 100644
--- a/src/clients/response.cpp
+++ b/src/clients/response.cpp
@@ -97,7 +97,7 @@
 {
   wire.parse();
   if (wire.elements().size() != 2) {
-    BOOST_THROW_EXCEPTION(Error("Unexpected number of components while decoding DOE record"));
+    NDN_THROW(Error("Unexpected number of elements while decoding DOE record"));
   }
   return std::make_pair(Name(wire.elements().front()), Name(wire.elements().back()));
 }