Replace remaining uses of BOOST_THROW_EXCEPTION with NDN_THROW
Change-Id: I0c149acbe5607d928cdf9e8d73813d5e74ca45d0
diff --git a/src/lsa/coordinate-lsa.cpp b/src/lsa/coordinate-lsa.cpp
index 4109c64..32172e6 100644
--- a/src/lsa/coordinate-lsa.cpp
+++ b/src/lsa/coordinate-lsa.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, The University of Memphis,
+ * Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -105,10 +105,7 @@
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::CoordinateLsa) {
- std::stringstream error;
- error << "Expected CoordinateLsa Block, but Block is of a different type: #"
- << m_wire.type();
- BOOST_THROW_EXCEPTION(Error(error.str()));
+ NDN_THROW(Error("CoordinateLsa", m_wire.type()));
}
m_wire.parse();
@@ -120,7 +117,7 @@
++val;
}
else {
- BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
+ NDN_THROW(Error("Missing required Lsa field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::HyperbolicRadius) {
@@ -128,7 +125,7 @@
++val;
}
else {
- BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicRadius field"));
+ NDN_THROW(Error("Missing required HyperbolicRadius field"));
}
std::vector<double> angles;
@@ -137,7 +134,7 @@
angles.push_back(ndn::encoding::readDouble(*val));
}
else {
- BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicAngle field"));
+ NDN_THROW(Error("Missing required HyperbolicAngle field"));
}
}
m_hyperbolicAngles = angles;