diff --git a/src/lp/cache-policy.cpp b/src/lp/cache-policy.cpp
index 6bd1be9..2802b96 100644
--- a/src/lp/cache-policy.cpp
+++ b/src/lp/cache-policy.cpp
@@ -56,7 +56,7 @@
 CachePolicy::wireEncode(EncodingImpl<TAG>& encoder) const
 {
   if (m_policy == CachePolicyType::NONE) {
-    throw Error("CachePolicyType must be set");
+    BOOST_THROW_EXCEPTION(Error("CachePolicyType must be set"));
   }
   size_t length = 0;
   length += prependNonNegativeIntegerBlock(encoder, tlv::CachePolicyType,
@@ -76,7 +76,7 @@
 CachePolicy::wireEncode() const
 {
   if (m_policy == CachePolicyType::NONE) {
-    throw Error("CachePolicyType must be set");
+    BOOST_THROW_EXCEPTION(Error("CachePolicyType must be set"));
   }
 
   if (m_wire.hasWire()) {
@@ -98,7 +98,7 @@
 CachePolicy::wireDecode(const Block& wire)
 {
   if (wire.type() != tlv::CachePolicy) {
-    throw Error("expecting CachePolicy block");
+    BOOST_THROW_EXCEPTION(Error("expecting CachePolicy block"));
   }
 
   m_wire = wire;
@@ -108,11 +108,11 @@
   if (it != m_wire.elements_end() && it->type() == tlv::CachePolicyType) {
     m_policy = static_cast<CachePolicyType>(readNonNegativeInteger(*it));
     if (this->getPolicy() == CachePolicyType::NONE) {
-      throw Error("unknown CachePolicyType");
+      BOOST_THROW_EXCEPTION(Error("unknown CachePolicyType"));
     }
   }
   else {
-    throw Error("expecting CachePolicyType block");
+    BOOST_THROW_EXCEPTION(Error("expecting CachePolicyType block"));
   }
 }
 
diff --git a/src/lp/detail/field-decl.hpp b/src/lp/detail/field-decl.hpp
index e6fd4aa..0738768 100644
--- a/src/lp/detail/field-decl.hpp
+++ b/src/lp/detail/field-decl.hpp
@@ -44,7 +44,7 @@
   decode(const Block& wire)
   {
     if (wire.type() != TlvType::value) {
-      throw ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type()));
+      BOOST_THROW_EXCEPTION(ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type())));
     }
 
     T type;
@@ -60,7 +60,7 @@
   decode(const Block& wire)
   {
     if (wire.type() != TlvType::value) {
-      throw ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type()));
+      BOOST_THROW_EXCEPTION(ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type())));
     }
 
     return readNonNegativeInteger(wire);
@@ -74,11 +74,11 @@
   decode(const Block& wire)
   {
     if (wire.type() != TlvType::value) {
-      throw ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type()));
+      BOOST_THROW_EXCEPTION(ndn::tlv::Error("Unexpected TLV type " + std::to_string(wire.type())));
     }
 
     if (wire.value_size() == 0) {
-      throw ndn::tlv::Error(std::to_string(wire.type()) + " must not be empty");
+      BOOST_THROW_EXCEPTION(ndn::tlv::Error(std::to_string(wire.type()) + " must not be empty"));
     }
 
     return std::make_pair(wire.value_begin(), wire.value_end());
@@ -147,4 +147,4 @@
 } // namespace lp
 } // namesapce ndn
 
-#endif // NDN_CXX_LP_DETAIL_FIELD_DECL_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_DETAIL_FIELD_DECL_HPP
diff --git a/src/lp/nack-header.cpp b/src/lp/nack-header.cpp
index 22fccae..9f3157c 100644
--- a/src/lp/nack-header.cpp
+++ b/src/lp/nack-header.cpp
@@ -96,7 +96,7 @@
 NackHeader::wireDecode(const Block& wire)
 {
   if (wire.type() != tlv::Nack) {
-    throw ndn::tlv::Error("expecting Nack block");
+    BOOST_THROW_EXCEPTION(ndn::tlv::Error("expecting Nack block"));
   }
 
   m_wire = wire;
@@ -110,7 +110,7 @@
       m_reason = static_cast<NackReason>(readNonNegativeInteger(*it));
     }
     else {
-      throw ndn::tlv::Error("expecting NackReason block");
+      BOOST_THROW_EXCEPTION(ndn::tlv::Error("expecting NackReason block"));
     }
   }
 }
diff --git a/src/lp/packet.cpp b/src/lp/packet.cpp
index 20de690..67957af 100644
--- a/src/lp/packet.cpp
+++ b/src/lp/packet.cpp
@@ -97,16 +97,16 @@
     detail::FieldInfo info(element.type());
 
     if (!info.isRecognized && !info.canIgnore) {
-      throw Error("unknown field cannot be ignored");
+      BOOST_THROW_EXCEPTION(Error("unknown field cannot be ignored"));
     }
 
     if (!isFirst) {
       if (info.tlvType == prev.tlvType && !info.isRepeatable) {
-        throw Error("non-repeatable field cannot be repeated");
+        BOOST_THROW_EXCEPTION(Error("non-repeatable field cannot be repeated"));
       }
 
       else if (info.tlvType != prev.tlvType && !detail::compareFieldSortOrder(prev, info)) {
-        throw Error("fields are not in correct sort order");
+        BOOST_THROW_EXCEPTION(Error("fields are not in correct sort order"));
       }
     }
 
@@ -126,4 +126,4 @@
 }
 
 } // namespace lp
-} // namespace ndn
\ No newline at end of file
+} // namespace ndn
diff --git a/src/lp/packet.hpp b/src/lp/packet.hpp
index bf0cb01..0febb75 100644
--- a/src/lp/packet.hpp
+++ b/src/lp/packet.hpp
@@ -110,7 +110,7 @@
       }
     }
 
-    throw std::out_of_range("Index out of range");
+    BOOST_THROW_EXCEPTION(std::out_of_range("Index out of range"));
   }
 
   /**
@@ -155,7 +155,7 @@
   add(const typename FIELD::ValueType& value)
   {
     if (!FIELD::IsRepeatable::value && has<FIELD>()) {
-      throw std::length_error("Field cannot be repeated");
+      BOOST_THROW_EXCEPTION(std::length_error("Field cannot be repeated"));
     }
 
     EncodingEstimator estimator;
@@ -195,7 +195,7 @@
       }
     }
 
-    throw std::out_of_range("Index out of range");
+    BOOST_THROW_EXCEPTION(std::out_of_range("Index out of range"));
   }
 
   /**
@@ -221,4 +221,4 @@
 } // namespace lp
 } // namespace ndn
 
-#endif // NDN_CXX_LP_PACKET_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_PACKET_HPP
