diff --git a/src/transport/stream-transport.hpp b/src/transport/stream-transport.hpp
index d7f2e49..99dc510 100644
--- a/src/transport/stream-transport.hpp
+++ b/src/transport/stream-transport.hpp
@@ -68,7 +68,7 @@
         // may need to throw exception
         m_transport.m_isConnected = false;
         m_transport.close();
-        throw Transport::Error(error, "error while connecting to the forwarder");
+        BOOST_THROW_EXCEPTION(Transport::Error(error, "error while connecting to the forwarder"));
       }
   }
 
@@ -79,7 +79,7 @@
       return;
 
     m_transport.close();
-    throw Transport::Error(error, "error while connecting to the forwarder");
+    BOOST_THROW_EXCEPTION(Transport::Error(error, "error while connecting to the forwarder"));
   }
 
   void
@@ -192,7 +192,7 @@
         }
 
         m_transport.close();
-        throw Transport::Error(error, "error while sending data to socket");
+        BOOST_THROW_EXCEPTION(Transport::Error(error, "error while sending data to socket"));
       }
 
     m_transmissionQueue.erase(queueItem);
@@ -231,7 +231,7 @@
         }
 
         m_transport.close();
-        throw Transport::Error(error, "error while receiving data from socket");
+        BOOST_THROW_EXCEPTION(Transport::Error(error, "error while receiving data from socket"));
       }
 
     m_inputBufferSize += nBytesRecvd;
@@ -242,8 +242,9 @@
     if (!hasProcessedSome && m_inputBufferSize == MAX_NDN_PACKET_SIZE && offset == 0)
       {
         m_transport.close();
-        throw Transport::Error(boost::system::error_code(),
-                               "input buffer full, but a valid TLV cannot be decoded");
+        BOOST_THROW_EXCEPTION(Transport::Error(boost::system::error_code(),
+                                               "input buffer full, but a valid TLV cannot be "
+                                               "decoded"));
       }
 
     if (offset > 0)
@@ -300,14 +301,14 @@
         if (error == boost::system::errc::operation_canceled)
           return;
 
-        throw Transport::Error(error, "Error during resolution of host or port");
+        BOOST_THROW_EXCEPTION(Transport::Error(error, "Error during resolution of host or port"));
       }
 
     typename Protocol::resolver::iterator end;
     if (endpoint == end)
       {
         this->m_transport.close();
-        throw Transport::Error(error, "Unable to resolve because host or port");
+        BOOST_THROW_EXCEPTION(Transport::Error(error, "Unable to resolve because host or port"));
       }
 
     this->m_socket.async_connect(*endpoint,
diff --git a/src/transport/tcp-transport.cpp b/src/transport/tcp-transport.cpp
index c43790f..afde1e0 100644
--- a/src/transport/tcp-transport.cpp
+++ b/src/transport/tcp-transport.cpp
@@ -57,8 +57,8 @@
 
     const std::string scheme = uri.getScheme();
     if (scheme != "tcp" && scheme != "tcp4" && scheme != "tcp6") {
-      throw Transport::Error("Cannot create TcpTransport from \"" +
-                             scheme + "\" URI");
+      BOOST_THROW_EXCEPTION(Transport::Error("Cannot create TcpTransport from \"" +
+                                             scheme + "\" URI"));
     }
 
     if (!uri.getHost().empty()) {
@@ -70,7 +70,7 @@
     }
   }
   catch (const util::FaceUri::Error& error) {
-    throw ConfigFile::Error(error.what());
+    BOOST_THROW_EXCEPTION(ConfigFile::Error(error.what()));
   }
 
   return {host, port};
diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
index df505d7..3464d79 100644
--- a/src/transport/unix-transport.cpp
+++ b/src/transport/unix-transport.cpp
@@ -49,8 +49,8 @@
 
       if (uri.getScheme() != "unix")
         {
-          throw Transport::Error("Cannot create UnixTransport from \"" +
-                                 uri.getScheme() + "\" URI");
+          BOOST_THROW_EXCEPTION(Transport::Error("Cannot create UnixTransport from \"" +
+                                                 uri.getScheme() + "\" URI"));
         }
 
       if (!uri.getPath().empty())
@@ -64,11 +64,11 @@
     }
   catch (const boost::property_tree::ptree_bad_data& error)
     {
-      throw ConfigFile::Error(error.what());
+      BOOST_THROW_EXCEPTION(ConfigFile::Error(error.what()));
     }
   catch (const util::FaceUri::Error& error)
     {
-      throw ConfigFile::Error(error.what());
+      BOOST_THROW_EXCEPTION(ConfigFile::Error(error.what()));
     }
 
   // Assume the default nfd.sock location.
