diff --git a/src/util/config-file.cpp b/src/util/config-file.cpp
index a68939d..ebf2a7a 100644
--- a/src/util/config-file.cpp
+++ b/src/util/config-file.cpp
@@ -123,11 +123,11 @@
 {
   if (m_path.empty())
     {
-      throw Error("Failed to locate configuration file for parsing");
+      BOOST_THROW_EXCEPTION(Error("Failed to locate configuration file for parsing"));
     }
   else if (!m_input.is_open() && !open())
     {
-      throw Error("Failed to open configuration file for parsing");
+      BOOST_THROW_EXCEPTION(Error("Failed to open configuration file for parsing"));
     }
 
   try
@@ -140,7 +140,7 @@
       msg << "Failed to parse configuration file";
       msg << " " << m_path;
       msg << " " << error.message() << " line " << error.line();
-      throw Error(msg.str());
+      BOOST_THROW_EXCEPTION(Error(msg.str()));
     }
   return m_config;
 }
diff --git a/src/util/digest.cpp b/src/util/digest.cpp
index d5bb312..23af4c9 100644
--- a/src/util/digest.cpp
+++ b/src/util/digest.cpp
@@ -126,7 +126,7 @@
 {
   // cannot update Digest when it has been finalized
   if (m_isFinalized)
-    throw Error("Digest has been already finalized");
+    BOOST_THROW_EXCEPTION(Error("Digest has been already finalized"));
 
   m_hash.Update(buffer, size);
 
diff --git a/src/util/dns.cpp b/src/util/dns.cpp
index 03bf9f9..7c992ff 100644
--- a/src/util/dns.cpp
+++ b/src/util/dns.cpp
@@ -151,7 +151,7 @@
           return EndPoint(*remoteEndpoint).address();
         }
     }
-  throw Error("No endpoint matching the specified address selector found");
+  BOOST_THROW_EXCEPTION(Error("No endpoint matching the specified address selector found"));
 }
 
 } // namespace dns
diff --git a/src/util/face-uri.cpp b/src/util/face-uri.cpp
index ff5669b..f23ae8c 100644
--- a/src/util/face-uri.cpp
+++ b/src/util/face-uri.cpp
@@ -48,14 +48,14 @@
 FaceUri::FaceUri(const std::string& uri)
 {
   if (!parse(uri)) {
-    throw Error("Malformed URI: " + uri);
+    BOOST_THROW_EXCEPTION(Error("Malformed URI: " + uri));
   }
 }
 
 FaceUri::FaceUri(const char* uri)
 {
   if (!parse(uri)) {
-    throw Error("Malformed URI: " + std::string(uri));
+    BOOST_THROW_EXCEPTION(Error("Malformed URI: " + std::string(uri)));
   }
 }
 
diff --git a/src/util/in-memory-storage.cpp b/src/util/in-memory-storage.cpp
index 9c3146f..5001e97 100644
--- a/src/util/in-memory-storage.cpp
+++ b/src/util/in-memory-storage.cpp
@@ -125,7 +125,7 @@
     ssize_t nAllowedFailures = size() - m_capacity;
     while (size() > m_capacity) {
       if (!evictItem() && --nAllowedFailures < 0) {
-        throw Error();
+        BOOST_THROW_EXCEPTION(Error());
       }
     }
   }
diff --git a/src/util/io.hpp b/src/util/io.hpp
index f49d712..f751bc6 100644
--- a/src/util/io.hpp
+++ b/src/util/io.hpp
@@ -148,15 +148,15 @@
     }
   catch (TypeError& e)
     {
-      throw Error(e.what());
+      BOOST_THROW_EXCEPTION(Error(e.what()));
     }
   catch (CryptoPP::Exception& e)
     {
-      throw Error(e.what());
+      BOOST_THROW_EXCEPTION(Error(e.what()));
     }
   catch (tlv::Error& e)
     {
-      throw Error(e.what());
+      BOOST_THROW_EXCEPTION(Error(e.what()));
     }
 }
 
diff --git a/src/util/network-monitor.cpp b/src/util/network-monitor.cpp
index 5513d0d..8f7b1f9 100644
--- a/src/util/network-monitor.cpp
+++ b/src/util/network-monitor.cpp
@@ -165,7 +165,8 @@
   {
     int fd = ::socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
     if (fd < 0)
-      throw Error(std::string("Cannot create netlink socket (") + std::strerror(errno) + ")");
+      BOOST_THROW_EXCEPTION(Error(std::string("Cannot create netlink socket (") +
+                                  std::strerror(errno) + ")"));
 
     sockaddr_nl addr{};
     addr.nl_family = AF_NETLINK;
@@ -174,7 +175,8 @@
       RTMGRP_IPV6_IFADDR | RTMGRP_IPV6_ROUTE;
 
     if (::bind(fd, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) == -1) {
-      throw Error(std::string("Cannot bind on netlink socket (") + std::strerror(errno) + ")");
+      BOOST_THROW_EXCEPTION(Error(std::string("Cannot bind on netlink socket (") +
+                                  std::strerror(errno) + ")"));
     }
 
     m_socket.assign(fd);
@@ -239,7 +241,7 @@
 
 NetworkMonitor::NetworkMonitor(boost::asio::io_service&)
 {
-  throw Error("Network monitoring is not supported on this platform");
+  BOOST_THROW_EXCEPTION(Error("Network monitoring is not supported on this platform"));
 }
 
 NetworkMonitor::~NetworkMonitor()
diff --git a/src/util/regex/regex-backref-matcher.hpp b/src/util/regex/regex-backref-matcher.hpp
index 1174541..77efd83 100644
--- a/src/util/regex/regex-backref-matcher.hpp
+++ b/src/util/regex/regex-backref-matcher.hpp
@@ -69,7 +69,7 @@
 RegexBackrefMatcher::compile()
 {
   if (m_expr.size() < 2)
-    throw RegexMatcher::Error("Unrecognized format: " + m_expr);
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unrecognized format: " + m_expr));
 
   size_t lastIndex = m_expr.size() - 1;
   if ('(' == m_expr[0] && ')' == m_expr[lastIndex]) {
@@ -80,7 +80,7 @@
     m_matchers.push_back(matcher);
   }
   else
-    throw RegexMatcher::Error("Unrecognized format: " + m_expr);
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unrecognized format: " + m_expr));
 }
 
 
diff --git a/src/util/regex/regex-component-matcher.hpp b/src/util/regex/regex-component-matcher.hpp
index 6b5474a..029bb03 100644
--- a/src/util/regex/regex-component-matcher.hpp
+++ b/src/util/regex/regex-component-matcher.hpp
@@ -136,7 +136,8 @@
     }
   else
     {
-      throw RegexMatcher::Error("Non-exact component search is not supported yet!");
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Non-exact component search is not supported "
+                                                "yet"));
     }
 
   return false;
diff --git a/src/util/regex/regex-component-set-matcher.hpp b/src/util/regex/regex-component-set-matcher.hpp
index 9c2ff16..b20ad44 100644
--- a/src/util/regex/regex-component-set-matcher.hpp
+++ b/src/util/regex/regex-component-set-matcher.hpp
@@ -92,7 +92,8 @@
 RegexComponentSetMatcher::compile()
 {
   if (m_expr.size() < 2)
-    throw RegexMatcher::Error("Regexp compile error (cannot parse " + m_expr + ")");
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Regexp compile error (cannot parse " +
+                                              m_expr + ")"));
 
   switch (m_expr[0]) {
   case '<':
@@ -101,7 +102,8 @@
     {
       size_t lastIndex = m_expr.size() - 1;
       if (']' != m_expr[lastIndex])
-        throw RegexMatcher::Error("Regexp compile error (no matching ']' in " + m_expr + ")");
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error("Regexp compile error (no matching ']' in " +
+                                                  m_expr + ")"));
 
       if ('^' == m_expr[1]) {
         m_isInclusion = false;
@@ -112,7 +114,8 @@
       break;
     }
   default:
-    throw RegexMatcher::Error("Regexp compile error (cannot parse " + m_expr + ")");
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Regexp compile error (cannot parse " +
+                                              m_expr + ")"));
   }
 }
 
@@ -123,7 +126,7 @@
 
   if (m_expr.size() != end)
     {
-      throw RegexMatcher::Error("Component expr error " + m_expr);
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Component expr error " + m_expr));
     }
   else
     {
@@ -142,7 +145,7 @@
 
   while (index < lastIndex) {
     if ('<' != m_expr[index])
-      throw RegexMatcher::Error("Component expr error " + m_expr);
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Component expr error " + m_expr));
 
     tempIndex = index + 1;
     index = extractComponent(tempIndex);
@@ -155,7 +158,7 @@
   }
 
   if (index != lastIndex)
-    throw RegexMatcher::Error("Not sufficient expr to parse " + m_expr);
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Not sufficient expr to parse " + m_expr));
 }
 
 inline bool
@@ -208,7 +211,7 @@
       break;
 
     case 0:
-      throw RegexMatcher::Error("Error: square brackets mismatch");
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Error: square brackets mismatch"));
       break;
     }
     index++;
diff --git a/src/util/regex/regex-pattern-list-matcher.hpp b/src/util/regex/regex-pattern-list-matcher.hpp
index acca0f9..fedcbaa 100644
--- a/src/util/regex/regex-pattern-list-matcher.hpp
+++ b/src/util/regex/regex-pattern-list-matcher.hpp
@@ -86,7 +86,7 @@
     subHead = index;
 
     if (!extractPattern(subHead, &index))
-      throw RegexMatcher::Error("Compile error");
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Compile error"));
   }
 }
 
@@ -135,7 +135,7 @@
     break;
 
   default:
-    throw RegexMatcher::Error("Unexpected syntax");
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unexpected syntax"));
   }
 
   *next = end;
@@ -152,7 +152,7 @@
   while (lcount > rcount) {
 
     if (index >= m_expr.size())
-      throw RegexMatcher::Error("Parenthesis mismatch");
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Parenthesis mismatch"));
 
     if (left == m_expr[index])
       lcount++;
@@ -184,7 +184,7 @@
         break;
     }
     if (index == exprSize)
-      throw RegexMatcher::Error("Missing right brace bracket");
+      BOOST_THROW_EXCEPTION(RegexMatcher::Error("Missing right brace bracket"));
     else
       return ++index;
   }
diff --git a/src/util/regex/regex-repeat-matcher.hpp b/src/util/regex/regex-repeat-matcher.hpp
index 3d6e4f5..530721e 100644
--- a/src/util/regex/regex-repeat-matcher.hpp
+++ b/src/util/regex/regex-repeat-matcher.hpp
@@ -162,12 +162,12 @@
         max = min;
       }
       else
-        throw RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition(): ")
-                                  + "Unrecognized format "+ m_expr);
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition():")
+                                                  + " Unrecognized format "+ m_expr));
 
       if (min > MAX_REPETITIONS || max > MAX_REPETITIONS || min > max)
-        throw RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition(): ")
-                                  + "Wrong number " + m_expr);
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition():")
+                                                  + " Wrong number " + m_expr));
 
       m_repeatMin = min;
       m_repeatMax = max;
diff --git a/src/util/regex/regex-top-matcher.cpp b/src/util/regex/regex-top-matcher.cpp
index 5ed4937..30b755f 100644
--- a/src/util/regex/regex-top-matcher.cpp
+++ b/src/util/regex/regex-top-matcher.cpp
@@ -146,7 +146,7 @@
                 result.append(*it);
             }
           else
-            throw RegexMatcher::Error("Exceed the range of back reference");
+            BOOST_THROW_EXCEPTION(RegexMatcher::Error("Exceed the range of back reference"));
         }
     }
   return result;
@@ -161,23 +161,23 @@
     {
       offset++;
       if (offset >= expand.size())
-        throw RegexMatcher::Error("wrong format of expand string!");
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
 
       while (expand[offset] <= '9' and expand[offset] >= '0') {
         offset++;
         if (offset > expand.size())
-          throw RegexMatcher::Error("wrong format of expand string!");
+          BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
       }
       if (offset > begin + 1)
         return expand.substr(begin, offset - begin);
       else
-        throw RegexMatcher::Error("wrong format of expand string!");
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
     }
   else if (expand[offset] == '<')
     {
       offset++;
       if (offset >= expand.size())
-        throw RegexMatcher::Error("wrong format of expand string!");
+        BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
 
       size_t left = 1;
       size_t right = 0;
@@ -189,12 +189,12 @@
             right++;
           offset++;
           if (offset >= expand.size())
-            throw RegexMatcher::Error("wrong format of expand string!");
+            BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
         }
       return expand.substr(begin, offset - begin);
     }
   else
-    throw RegexMatcher::Error("wrong format of expand string!");
+    BOOST_THROW_EXCEPTION(RegexMatcher::Error("wrong format of expand string!"));
 }
 
 shared_ptr<RegexTopMatcher>
diff --git a/src/util/sqlite3-statement.cpp b/src/util/sqlite3-statement.cpp
index 243088b..f1871db 100644
--- a/src/util/sqlite3-statement.cpp
+++ b/src/util/sqlite3-statement.cpp
@@ -35,7 +35,7 @@
 {
   int res = sqlite3_prepare_v2(database, statement.c_str(), -1, &m_stmt, nullptr);
   if (res != SQLITE_OK)
-    throw std::domain_error("bad SQL statement: " + statement);
+    BOOST_THROW_EXCEPTION(std::domain_error("bad SQL statement: " + statement));
 }
 
 int
diff --git a/src/util/string-helper.cpp b/src/util/string-helper.cpp
index fc0e1a1..16064b0 100644
--- a/src/util/string-helper.cpp
+++ b/src/util/string-helper.cpp
@@ -89,7 +89,8 @@
 fromHex(const std::string& hexString)
 {
   if (hexString.size() % 2 != 0) {
-    throw StringHelperError("Invalid number of characters in the supplied hex string");
+    BOOST_THROW_EXCEPTION(StringHelperError("Invalid number of characters in the supplied hex "
+                                            "string"));
   }
 
   using namespace CryptoPP;
@@ -99,7 +100,7 @@
   shared_ptr<const Buffer> buffer = os.buf();
 
   if (buffer->size() * 2 != hexString.size()) {
-    throw StringHelperError("The supplied hex string contains non-hex characters");
+    BOOST_THROW_EXCEPTION(StringHelperError("The supplied hex string contains non-hex characters"));
   }
 
   return buffer;
