Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW
Refs: #4834
Change-Id: If2455e1830f310beea434ffb455d960e11c4c2ed
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 31e2b91..13560a9 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -39,10 +39,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("AccessStrategy does not accept parameters"));
+ NDN_THROW(std::invalid_argument("AccessStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"AccessStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index f743e06..6302020 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.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,
@@ -85,7 +85,7 @@
m_lastInterestName = interestName;
}
else {
- BOOST_THROW_EXCEPTION(FaceInfo::Error("Tried to schedule a timeout for a face that already has a timeout scheduled."));
+ NDN_THROW(FaceInfo::Error("Tried to schedule a timeout for a face that already has a timeout scheduled"));
}
}
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 8a81a77..dd2b537 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -197,9 +197,8 @@
m_probingInterval = time::milliseconds(probingInterval);
}
else {
- BOOST_THROW_EXCEPTION(std::invalid_argument("Probing interval should be >= "
- + to_string(MIN_PROBING_INTERVAL.count())
- + " milliseconds"));
+ NDN_THROW(std::invalid_argument("Probing interval should be >= " +
+ to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
}
}
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index d47649d..67d6944 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.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,
@@ -52,7 +52,7 @@
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"AsfStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
@@ -75,7 +75,7 @@
std::string parsedStr(reinterpret_cast<const char*>(component.value()), component.value_size());
auto n = parsedStr.find("~");
if (n == std::string::npos) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("Format is <parameter>~<value>"));
+ NDN_THROW(std::invalid_argument("Format is <parameter>~<value>"));
}
auto f = parsedStr.substr(0, n);
@@ -87,7 +87,7 @@
m_maxSilentTimeouts = getParamValue(f, s);
}
else {
- BOOST_THROW_EXCEPTION(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
+ NDN_THROW(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
}
}
}
@@ -97,12 +97,12 @@
{
try {
if (!value.empty() && value[0] == '-')
- BOOST_THROW_EXCEPTION(boost::bad_lexical_cast());
+ NDN_THROW(boost::bad_lexical_cast());
return boost::lexical_cast<uint64_t>(value);
}
catch (const boost::bad_lexical_cast&) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("Value of " + param + " must be a non-negative integer"));
+ NDN_THROW(std::invalid_argument("Value of " + param + " must be a non-negative integer"));
}
}
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index e4462e4..dbf410b 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.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,
@@ -63,10 +63,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy does not accept parameters"));
+ NDN_THROW(std::invalid_argument("BestRouteStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"BestRouteStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 0ab6b25..03f27dc 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.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,
@@ -45,10 +45,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy2 does not accept parameters"));
+ NDN_THROW(std::invalid_argument("BestRouteStrategy2 does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"BestRouteStrategy2 does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 6a05356..71fa7c1 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.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,
@@ -46,10 +46,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("MulticastStrategy does not accept parameters"));
+ NDN_THROW(std::invalid_argument("MulticastStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"MulticastStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index df9a41b..9a16897 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -42,10 +42,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("NccStrategy does not accept parameters"));
+ NDN_THROW(std::invalid_argument("NccStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"NccStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index 5a43a26..174dca4 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -49,10 +49,10 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (!parsed.parameters.empty()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
+ NDN_THROW(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- BOOST_THROW_EXCEPTION(std::invalid_argument(
+ NDN_THROW(std::invalid_argument(
"SelfLearningStrategy does not support version " + to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));