Remove use of deprecated code

Change-Id: I721e9d0f9b41e7a53d75b1fde4a718c349273eeb
Refs: #3988
diff --git a/src/handles/watch-handle.cpp b/src/handles/watch-handle.cpp
index 9e80212..25ce278 100644
--- a/src/handles/watch-handle.cpp
+++ b/src/handles/watch-handle.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-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -68,7 +68,7 @@
 WatchHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
 {
   std::cerr << reason << std::endl;
-  throw Error("watch prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("watch prefix registration failed"));
 }
 
 void
@@ -106,7 +106,7 @@
 }
 
 void
-WatchHandle::onData(const Interest& interest, ndn::Data& data, const Name& name)
+WatchHandle::onData(const Interest& interest, const ndn::Data& data, const Name& name)
 {
   m_validator.validate(data,
                        bind(&WatchHandle::onDataValidated, this, interest, _1, name),
@@ -148,10 +148,11 @@
     ++m_interestNum;
     getFace().expressInterest(fetchInterest,
                               bind(&WatchHandle::onData, this, _1, _2, name),
+                              bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                               bind(&WatchHandle::onTimeout, this, _1, name));
   }
   else {
-    throw Error("Insert into Repo Failed");
+    BOOST_THROW_EXCEPTION(Error("Insert into Repo Failed"));
   }
   m_processes[name].first.setInsertNum(m_size);
 }
@@ -190,6 +191,7 @@
   ++m_interestNum;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, name),
+                            bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, name));
 }
 
@@ -211,6 +213,7 @@
   ++m_interestNum;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, name),
+                            bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, name));
 
 }
@@ -310,7 +313,7 @@
 WatchHandle::deferredDeleteProcess(const Name& name)
 {
   getScheduler().scheduleEvent(PROCESS_DELETE_TIME,
-                               ndn::bind(&WatchHandle::deleteProcess, this, name));
+                               bind(&WatchHandle::deleteProcess, this, name));
 }
 
 void
@@ -351,6 +354,7 @@
   m_interestNum++;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, parameter.getName()),
+                            bind(&WatchHandle::onTimeout, this, _1, parameter.getName()), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, parameter.getName()));
 }
 
@@ -377,4 +381,4 @@
   return true;
 }
 
-} //namespace repo
+} // namespace repo