Replace remaining uses of BOOST_THROW_EXCEPTION with NDN_THROW
Change-Id: I0c149acbe5607d928cdf9e8d73813d5e74ca45d0
diff --git a/src/lsa/adj-lsa.cpp b/src/lsa/adj-lsa.cpp
index f3b04da..781422c 100644
--- a/src/lsa/adj-lsa.cpp
+++ b/src/lsa/adj-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.
*
@@ -93,8 +93,7 @@
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::AdjacencyLsa) {
- BOOST_THROW_EXCEPTION(Error("Expected AdjacencyLsa Block, but Block is of a different type: #" +
- ndn::to_string(m_wire.type())));
+ NDN_THROW(Error("AdjacencyLsa", m_wire.type()));
}
m_wire.parse();
@@ -106,18 +105,16 @@
++val;
}
else {
- BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
+ NDN_THROW(Error("Missing required Lsa field"));
}
AdjacencyList adl;
for (; val != m_wire.elements_end(); ++val) {
if (val->type() == ndn::tlv::nlsr::Adjacency) {
- Adjacent adj = Adjacent(*val);
- adl.insert(adj);
+ adl.insert(Adjacent(*val));
}
else {
- BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
- ndn::to_string(m_wire.type())));
+ NDN_THROW(Error("Adjacency", val->type()));
}
}
m_adl = adl;