refactor: cleanup and sync
* Fix Jenkins scripts and sync with ndn-cxx
* Sync waf-tools
* Remove ChronoSync submodule
* Remove commented/dead code and includes
* Use ScopedEventId and ScopedRegisteredPrefixHandle
* Set setCanBePrefix to true explicitly everywhere
* Fix macOS build, add GHA CI
* Use NDN_THROW for throwing errors
* Other smaller fixes
Change-Id: I615e0e239511b97101852e1d7c620a2071a18ff8
diff --git a/src/conf.cpp b/src/conf.cpp
index d02fe08..db44604 100644
--- a/src/conf.cpp
+++ b/src/conf.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
*
* BSD license, See the LICENSE file for more information
*
@@ -79,14 +79,14 @@
// String
if (m_wire.type() != tlv::Conf)
- throw Error("Unexpected TLV number when decoding conf packet");
+ NDN_THROW(Error("Unexpected TLV number when decoding conf packet"));
// Identity
Block::element_const_iterator i = m_wire.elements_begin();
if (i == m_wire.elements_end())
- throw Error("Missing Identity");
+ NDN_THROW(Error("Missing Identity"));
if (i->type() != tlv::Name)
- throw Error("Expect Identity but get TLV Type " + std::to_string(i->type()));
+ NDN_THROW(Error("Expect Identity but get TLV Type " + std::to_string(i->type())));
m_identity.wireDecode(*i);
++i;
@@ -95,15 +95,14 @@
if (i == m_wire.elements_end())
return;
if (i->type() != tlv::Nick)
- throw Error("Expect Nick but get TLV Type " + std::to_string(i->type()));
+ NDN_THROW(Error("Expect Nick but get TLV Type " + std::to_string(i->type())));
m_nick = std::string(reinterpret_cast<const char* >(i->value()),
i->value_size());
++i;
- if (i != m_wire.elements_end()) {
- throw Error("Unexpected element");
- }
+ if (i != m_wire.elements_end())
+ NDN_THROW(Error("Unexpected element"));
}
void