diff --git a/src/management/nfd-channel-status.cpp b/src/management/nfd-channel-status.cpp
index 2c93283..b53d198 100644
--- a/src/management/nfd-channel-status.cpp
+++ b/src/management/nfd-channel-status.cpp
@@ -82,7 +82,7 @@
 ChannelStatus::wireDecode(const Block& block)
 {
   if (block.type() != tlv::nfd::ChannelStatus) {
-    throw Error("expecting ChannelStatus block");
+    BOOST_THROW_EXCEPTION(Error("Expecting ChannelStatus block"));
   }
   m_wire = block;
   m_wire.parse();
@@ -93,7 +93,7 @@
     ++val;
   }
   else {
-    throw Error("missing required LocalUri field");
+    BOOST_THROW_EXCEPTION(Error("Missing required LocalUri field"));
   }
 }
 
diff --git a/src/management/nfd-command-options.cpp b/src/management/nfd-command-options.cpp
index 72326c9..8a2b9f7 100644
--- a/src/management/nfd-command-options.cpp
+++ b/src/management/nfd-command-options.cpp
@@ -42,7 +42,7 @@
 CommandOptions::setTimeout(const time::milliseconds& timeout)
 {
   if (timeout <= time::milliseconds::zero()) {
-    throw std::out_of_range("timeout must be positive");
+    BOOST_THROW_EXCEPTION(std::out_of_range("Timeout must be positive"));
   }
 
   m_timeout = timeout;
@@ -76,7 +76,8 @@
   case security::SigningInfo::SIGNER_TYPE_CERT:
     return SIGNING_PARAMS_CERTIFICATE;
   default:
-    throw std::out_of_range("SigningInfo::SignerType is not convertible to CommandOptions::SigningParamsKind");
+    BOOST_THROW_EXCEPTION(std::out_of_range("SigningInfo::SignerType is not convertible to "
+                                            "CommandOptions::SigningParamsKind"));
   }
 }
 
@@ -114,7 +115,7 @@
   // A valid IdentityCertificate has at least 4 name components,
   // as it follows `<...>/KEY/<...>/<key-id>/ID-CERT/<version>` naming model.
   if (certificateName.size() < 4) {
-    throw std::invalid_argument("certificate is invalid");
+    BOOST_THROW_EXCEPTION(std::invalid_argument("Certificate is invalid"));
   }
 
   return security::signingByCertificate(certificateName);
diff --git a/src/management/nfd-control-command.cpp b/src/management/nfd-control-command.cpp
index 3c87d3f..d8ab2c6 100644
--- a/src/management/nfd-control-command.cpp
+++ b/src/management/nfd-control-command.cpp
@@ -80,11 +80,13 @@
     bool isPresent = presentFields[i];
     if (m_required[i]) {
       if (!isPresent) {
-        throw ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is required but missing");
+        BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is required but "
+                                            "missing"));
       }
     }
     else if (isPresent && !m_optional[i]) {
-      throw ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is forbidden but present");
+      BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is forbidden but "
+                                          "present"));
     }
   }
 }
@@ -105,7 +107,7 @@
   this->ControlCommand::validateResponse(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
@@ -123,7 +125,7 @@
   this->ControlCommand::validateRequest(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
@@ -151,7 +153,7 @@
     case LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID:
       break;
     default:
-      throw ArgumentError("LocalControlFeature is invalid");
+      BOOST_THROW_EXCEPTION(ArgumentError("LocalControlFeature is invalid"));
   }
 }
 
@@ -201,7 +203,7 @@
   this->ControlCommand::validateResponse(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
@@ -230,7 +232,7 @@
   this->ControlCommand::validateResponse(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
@@ -257,7 +259,7 @@
   this->ControlCommand::validateRequest(parameters);
 
   if (parameters.getName().size() == 0) {
-    throw ArgumentError("Name must not be ndn:/");
+    BOOST_THROW_EXCEPTION(ArgumentError("Name must not be ndn:/"));
   }
 }
 
@@ -309,7 +311,7 @@
   this->ControlCommand::validateResponse(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
@@ -343,7 +345,7 @@
   this->ControlCommand::validateResponse(parameters);
 
   if (parameters.getFaceId() == 0) {
-    throw ArgumentError("FaceId must not be zero");
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
   }
 }
 
diff --git a/src/management/nfd-control-parameters.cpp b/src/management/nfd-control-parameters.cpp
index eb9fa0f..f8ce363 100644
--- a/src/management/nfd-control-parameters.cpp
+++ b/src/management/nfd-control-parameters.cpp
@@ -115,7 +115,7 @@
 ControlParameters::wireDecode(const Block& block)
 {
   if (block.type() != tlv::nfd::ControlParameters) {
-    throw Error("expecting TLV-TYPE ControlParameters");
+    BOOST_THROW_EXCEPTION(Error("Expecting TLV-TYPE ControlParameters"));
   }
   m_wire = block;
   m_wire.parse();
@@ -168,7 +168,7 @@
   if (this->hasStrategy()) {
     val->parse();
     if (val->elements().empty()) {
-      throw Error("expecting Strategy/Name");
+      BOOST_THROW_EXCEPTION(Error("Expecting Strategy/Name"));
     }
     else {
       m_strategy.wireDecode(*val->elements_begin());
diff --git a/src/management/nfd-control-response.cpp b/src/management/nfd-control-response.cpp
index 0c2166c..7056162 100644
--- a/src/management/nfd-control-response.cpp
+++ b/src/management/nfd-control-response.cpp
@@ -74,13 +74,15 @@
   m_wire.parse();
 
   if (m_wire.type() != tlv::nfd::ControlResponse)
-    throw Error("Requested decoding of ControlResponse, but Block is of different type");
+    BOOST_THROW_EXCEPTION(Error("Requested decoding of ControlResponse, but Block is of different "
+                                "type"));
 
   Block::element_const_iterator val = m_wire.elements_begin();
   if (val == m_wire.elements_end() ||
       val->type() != tlv::nfd::StatusCode)
     {
-      throw Error("Incorrect ControlResponse format (StatusCode missing or not the first item)");
+      BOOST_THROW_EXCEPTION(Error("Incorrect ControlResponse format (StatusCode missing or not the "
+                                  "first item)"));
     }
 
   m_code = readNonNegativeInteger(*val);
@@ -89,7 +91,8 @@
   if (val == m_wire.elements_end() ||
       val->type() != tlv::nfd::StatusText)
     {
-      throw Error("Incorrect ControlResponse format (StatusText missing or not the second item)");
+      BOOST_THROW_EXCEPTION(Error("Incorrect ControlResponse format (StatusText missing or not the "
+                                  "second item)"));
     }
   m_text.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
   ++val;
diff --git a/src/management/nfd-face-event-notification.cpp b/src/management/nfd-face-event-notification.cpp
index 9e757a3..5f80fe8 100644
--- a/src/management/nfd-face-event-notification.cpp
+++ b/src/management/nfd-face-event-notification.cpp
@@ -89,7 +89,7 @@
 FaceEventNotification::wireDecode(const Block& block)
 {
   if (block.type() != tlv::nfd::FaceEventNotification) {
-    throw Error("expecting FaceEventNotification block");
+    BOOST_THROW_EXCEPTION(Error("expecting FaceEventNotification block"));
   }
   m_wire = block;
   m_wire.parse();
@@ -100,7 +100,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FaceEventKind field");
+    BOOST_THROW_EXCEPTION(Error("missing required FaceEventKind field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceId) {
@@ -108,7 +108,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FaceId field");
+    BOOST_THROW_EXCEPTION(Error("missing required FaceId field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
@@ -116,7 +116,7 @@
     ++val;
   }
   else {
-    throw Error("missing required Uri field");
+    BOOST_THROW_EXCEPTION(Error("missing required Uri field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
@@ -124,7 +124,7 @@
     ++val;
   }
   else {
-    throw Error("missing required LocalUri field");
+    BOOST_THROW_EXCEPTION(Error("missing required LocalUri field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
@@ -132,7 +132,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FaceScope field");
+    BOOST_THROW_EXCEPTION(Error("missing required FaceScope field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
@@ -140,7 +140,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FacePersistency field");
+    BOOST_THROW_EXCEPTION(Error("missing required FacePersistency field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
@@ -148,7 +148,7 @@
     ++val;
   }
   else {
-    throw Error("missing required LinkType field");
+    BOOST_THROW_EXCEPTION(Error("missing required LinkType field"));
   }
 }
 
diff --git a/src/management/nfd-face-query-filter.cpp b/src/management/nfd-face-query-filter.cpp
index 0fa02f2..bd10d2b 100644
--- a/src/management/nfd-face-query-filter.cpp
+++ b/src/management/nfd-face-query-filter.cpp
@@ -122,7 +122,7 @@
 {
   //all fields are optional
   if (block.type() != tlv::nfd::FaceQueryFilter) {
-    throw Error("expecting FaceQueryFilter block");
+    BOOST_THROW_EXCEPTION(Error("expecting FaceQueryFilter block"));
   }
 
   m_wire = block;
@@ -350,4 +350,3 @@
 
 } // namespace nfd
 } // namespace ndn
-
diff --git a/src/management/nfd-face-status.cpp b/src/management/nfd-face-status.cpp
index becaa75..30af9fb 100644
--- a/src/management/nfd-face-status.cpp
+++ b/src/management/nfd-face-status.cpp
@@ -115,7 +115,7 @@
 FaceStatus::wireDecode(const Block& block)
 {
   if (block.type() != tlv::nfd::FaceStatus) {
-    throw Error("expecting FaceStatus block");
+    BOOST_THROW_EXCEPTION(Error("expecting FaceStatus block"));
   }
   m_wire = block;
   m_wire.parse();
@@ -126,7 +126,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FaceId field");
+    BOOST_THROW_EXCEPTION(Error("missing required FaceId field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
@@ -134,7 +134,7 @@
     ++val;
   }
   else {
-    throw Error("missing required Uri field");
+    BOOST_THROW_EXCEPTION(Error("missing required Uri field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
@@ -142,7 +142,7 @@
     ++val;
   }
   else {
-    throw Error("missing required LocalUri field");
+    BOOST_THROW_EXCEPTION(Error("missing required LocalUri field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::ExpirationPeriod) {
@@ -160,7 +160,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FaceScope field");
+    BOOST_THROW_EXCEPTION(Error("missing required FaceScope field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
@@ -168,7 +168,7 @@
     ++val;
   }
   else {
-    throw Error("missing required FacePersistency field");
+    BOOST_THROW_EXCEPTION(Error("missing required FacePersistency field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
@@ -176,7 +176,7 @@
     ++val;
   }
   else {
-    throw Error("missing required LinkType field");
+    BOOST_THROW_EXCEPTION(Error("missing required LinkType field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInInterests) {
@@ -184,7 +184,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NInInterests field");
+    BOOST_THROW_EXCEPTION(Error("missing required NInInterests field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInDatas) {
@@ -192,7 +192,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NInDatas field");
+    BOOST_THROW_EXCEPTION(Error("missing required NInDatas field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutInterests) {
@@ -200,7 +200,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NOutInterests field");
+    BOOST_THROW_EXCEPTION(Error("missing required NOutInterests field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutDatas) {
@@ -208,7 +208,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NOutDatas field");
+    BOOST_THROW_EXCEPTION(Error("missing required NOutDatas field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInBytes) {
@@ -216,7 +216,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NInBytes field");
+    BOOST_THROW_EXCEPTION(Error("missing required NInBytes field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutBytes) {
@@ -224,7 +224,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NOutBytes field");
+    BOOST_THROW_EXCEPTION(Error("missing required NOutBytes field"));
   }
 }
 
diff --git a/src/management/nfd-fib-entry.cpp b/src/management/nfd-fib-entry.cpp
index b8c5274..fb07329 100644
--- a/src/management/nfd-fib-entry.cpp
+++ b/src/management/nfd-fib-entry.cpp
@@ -124,31 +124,31 @@
     std::stringstream error;
     error << "Requested decoding of NextHopRecord, but Block is of a different type: #"
           << m_wire.type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
   m_wire.parse();
 
   Block::element_const_iterator val = m_wire.elements_begin();
   if (val == m_wire.elements_end()) {
-    throw Error("Unexpected end of NextHopRecord");
+    BOOST_THROW_EXCEPTION(Error("Unexpected end of NextHopRecord"));
   }
   else if (val->type() != tlv::nfd::FaceId) {
     std::stringstream error;
     error << "Expected FaceId, but Block is of a different type: #"
           << val->type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
   m_faceId = readNonNegativeInteger(*val);
   ++val;
 
   if (val == m_wire.elements_end()) {
-    throw Error("Unexpected end of NextHopRecord");
+    BOOST_THROW_EXCEPTION(Error("Unexpected end of NextHopRecord"));
   }
   else if (val->type() != tlv::nfd::Cost) {
     std::stringstream error;
     error << "Expected Cost, but Block is of a different type: #"
           << m_wire.type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
   m_cost = readNonNegativeInteger(*val);
 }
@@ -235,20 +235,20 @@
     std::stringstream error;
     error << "Requested decoding of FibEntry, but Block is of a different type: #"
           << m_wire.type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
 
   m_wire.parse();
 
   Block::element_const_iterator val = m_wire.elements_begin();
   if (val == m_wire.elements_end()) {
-    throw Error("Unexpected end of FibEntry");
+    BOOST_THROW_EXCEPTION(Error("Unexpected end of FibEntry"));
   }
   else if (val->type() != tlv::Name) {
     std::stringstream error;
     error << "Expected Name, but Block is of a different type: #"
           << val->type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
   m_prefix.wireDecode(*val);
   ++val;
@@ -258,7 +258,7 @@
       std::stringstream error;
       error << "Expected NextHopRecords, but Block is of a different type: #"
             << val->type();
-      throw Error(error.str());
+      BOOST_THROW_EXCEPTION(Error(error.str()));
     }
     m_nextHopRecords.push_back(NextHopRecord(*val));
   }
diff --git a/src/management/nfd-forwarder-status.cpp b/src/management/nfd-forwarder-status.cpp
index 4e989ee..81b3bb9 100644
--- a/src/management/nfd-forwarder-status.cpp
+++ b/src/management/nfd-forwarder-status.cpp
@@ -116,7 +116,7 @@
 ForwarderStatus::wireDecode(const Block& block)
 {
   if (block.type() != tlv::Content) {
-    throw Error("expecting Content block for Status payload");
+    BOOST_THROW_EXCEPTION(Error("expecting Content block for Status payload"));
   }
   m_wire = block;
   m_wire.parse();
@@ -127,7 +127,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NfdVersion field");
+    BOOST_THROW_EXCEPTION(Error("missing required NfdVersion field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::StartTimestamp) {
@@ -135,7 +135,7 @@
     ++val;
   }
   else {
-    throw Error("missing required StartTimestamp field");
+    BOOST_THROW_EXCEPTION(Error("missing required StartTimestamp field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::CurrentTimestamp) {
@@ -143,7 +143,7 @@
     ++val;
   }
   else {
-    throw Error("missing required CurrentTimestamp field");
+    BOOST_THROW_EXCEPTION(Error("missing required CurrentTimestamp field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NNameTreeEntries) {
@@ -151,7 +151,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NNameTreeEntries field");
+    BOOST_THROW_EXCEPTION(Error("missing required NNameTreeEntries field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NFibEntries) {
@@ -159,7 +159,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NFibEntries field");
+    BOOST_THROW_EXCEPTION(Error("missing required NFibEntries field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NPitEntries) {
@@ -167,7 +167,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NPitEntries field");
+    BOOST_THROW_EXCEPTION(Error("missing required NPitEntries field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NMeasurementsEntries) {
@@ -175,7 +175,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NMeasurementsEntries field");
+    BOOST_THROW_EXCEPTION(Error("missing required NMeasurementsEntries field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NCsEntries) {
@@ -183,7 +183,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NCsEntries field");
+    BOOST_THROW_EXCEPTION(Error("missing required NCsEntries field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInInterests) {
@@ -191,7 +191,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NInInterests field");
+    BOOST_THROW_EXCEPTION(Error("missing required NInInterests field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInDatas) {
@@ -199,7 +199,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NInDatas field");
+    BOOST_THROW_EXCEPTION(Error("missing required NInDatas field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutInterests) {
@@ -207,7 +207,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NOutInterests field");
+    BOOST_THROW_EXCEPTION(Error("missing required NOutInterests field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutDatas) {
@@ -215,7 +215,7 @@
     ++val;
   }
   else {
-    throw Error("missing required NOutDatas field");
+    BOOST_THROW_EXCEPTION(Error("missing required NOutDatas field"));
   }
 }
 
diff --git a/src/management/nfd-local-control-header.hpp b/src/management/nfd-local-control-header.hpp
index 8108230..327035d 100644
--- a/src/management/nfd-local-control-header.hpp
+++ b/src/management/nfd-local-control-header.hpp
@@ -250,7 +250,8 @@
 {
   /// @todo should this be BOOST_ASSERT instead?  This is kind of unnecessary overhead
   if (empty(encodeMask))
-    throw Error("Requested wire for LocalControlHeader, but none of the fields are set or enabled");
+    BOOST_THROW_EXCEPTION(Error("Requested wire for LocalControlHeader, but none of the fields are "
+                                "set or enabled"));
 
   EncodingEstimator estimator;
   size_t length = wireEncode(estimator, payload.wireEncode().size(), encodeMask);
@@ -297,7 +298,7 @@
               m_cachingPolicy = CachingPolicy::NO_CACHE;
             }
             else {
-              throw Error("CachingPolicy: Missing required NoCache field");
+              BOOST_THROW_EXCEPTION(Error("CachingPolicy: Missing required NoCache field"));
             }
           }
           break;
diff --git a/src/management/nfd-rib-entry.cpp b/src/management/nfd-rib-entry.cpp
index ab78d5c..7c056cd 100644
--- a/src/management/nfd-rib-entry.cpp
+++ b/src/management/nfd-rib-entry.cpp
@@ -130,7 +130,7 @@
     std::stringstream error;
     error << "Expected Route Block, but Block is of a different type: #"
           << m_wire.type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
 
   m_wire.parse();
@@ -142,7 +142,7 @@
     ++val;
   }
   else {
-    throw Error("Missing required FaceId field");
+    BOOST_THROW_EXCEPTION(Error("Missing required FaceId field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Origin) {
@@ -150,7 +150,7 @@
     ++val;
   }
   else {
-    throw Error("Missing required Origin field");
+    BOOST_THROW_EXCEPTION(Error("Missing required Origin field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Cost) {
@@ -158,7 +158,7 @@
     ++val;
   }
   else {
-    throw Error("Missing required Cost field");
+    BOOST_THROW_EXCEPTION(Error("Missing required Cost field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Flags) {
@@ -166,7 +166,7 @@
     ++val;
   }
   else {
-    throw Error("Missing required Flags field");
+    BOOST_THROW_EXCEPTION(Error("Missing required Flags field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::ExpirationPeriod) {
@@ -272,7 +272,7 @@
     std::stringstream error;
     error << "Expected RibEntry Block, but Block is of a different type: #"
           << m_wire.type();
-    throw Error(error.str());
+    BOOST_THROW_EXCEPTION(Error(error.str()));
   }
 
   m_wire.parse();
@@ -284,7 +284,7 @@
     ++val;
   }
   else {
-    throw Error("Missing required Name field");
+    BOOST_THROW_EXCEPTION(Error("Missing required Name field"));
   }
 
   for (; val != m_wire.elements_end(); ++val) {
@@ -296,7 +296,7 @@
       std::stringstream error;
       error << "Expected Route Block, but Block is of a different type: #"
             << m_wire.type();
-      throw Error(error.str());
+      BOOST_THROW_EXCEPTION(Error(error.str()));
     }
   }
 }
diff --git a/src/management/nfd-strategy-choice.cpp b/src/management/nfd-strategy-choice.cpp
index 6283acd..659293c 100644
--- a/src/management/nfd-strategy-choice.cpp
+++ b/src/management/nfd-strategy-choice.cpp
@@ -82,7 +82,7 @@
 StrategyChoice::wireDecode(const Block& block)
 {
   if (block.type() != tlv::nfd::StrategyChoice) {
-    throw Error("expecting StrategyChoice block");
+    BOOST_THROW_EXCEPTION(Error("expecting StrategyChoice block"));
   }
   m_wire = block;
   m_wire.parse();
@@ -93,13 +93,13 @@
     ++val;
   }
   else {
-    throw Error("missing required Name field");
+    BOOST_THROW_EXCEPTION(Error("missing required Name field"));
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Strategy) {
     val->parse();
     if (val->elements().empty()) {
-      throw Error("expecting Strategy/Name");
+      BOOST_THROW_EXCEPTION(Error("expecting Strategy/Name"));
     }
     else {
       m_strategy.wireDecode(*val->elements_begin());
@@ -107,7 +107,7 @@
     ++val;
   }
   else {
-    throw Error("missing required Strategy field");
+    BOOST_THROW_EXCEPTION(Error("missing required Strategy field"));
   }
 }
 
