Remove use of deprecated code
Change-Id: I721e9d0f9b41e7a53d75b1fde4a718c349273eeb
Refs: #3988
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index a445110..1d81b17 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, 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.
@@ -84,7 +84,7 @@
ip::tcp::resolver::iterator end;
if (endpoint == end)
- throw Error("Cannot listen on [" + host + ":" + port + "]");
+ BOOST_THROW_EXCEPTION(Error("Cannot listen on [" + host + ":" + port + "]"));
m_localEndpoint = *endpoint;
std::cerr << "Start listening on " << m_localEndpoint << std::endl;
@@ -179,7 +179,7 @@
else
std::cerr << "FAILED to inject " << data.getName() << std::endl;
}
- catch (std::runtime_error& error) {
+ catch (const std::runtime_error& error) {
/// \todo Catch specific error after determining what wireDecode() can throw
std::cerr << "Error decoding received Data packet" << std::endl;
}