diff --git a/src/security/pib-memory.cpp b/src/security/pib-memory.cpp
index 397b0db..09300f1 100644
--- a/src/security/pib-memory.cpp
+++ b/src/security/pib-memory.cpp
@@ -33,7 +33,7 @@
 void
 PibMemory::setTpmLocator(const std::string& tpmLocator)
 {
-  throw Error("PibMemory does not need a locator");
+  BOOST_THROW_EXCEPTION(Error("PibMemory does not need a locator"));
 }
 
 std::string
@@ -92,7 +92,7 @@
   if (m_hasDefaultIdentity)
     return m_defaultIdentity;
 
-  throw Pib::Error("No default identity");
+  BOOST_THROW_EXCEPTION(Pib::Error("No default identity"));
 }
 
 bool
@@ -131,7 +131,7 @@
 PibMemory::getKeyBits(const Name& identity, const name::Component& keyId) const
 {
   if (!hasKey(identity, keyId))
-    throw Pib::Error("No key");
+    BOOST_THROW_EXCEPTION(Pib::Error("No key"));
 
   auto it = m_keys.find(getKeyName(identity, keyId));
   return it->second;
@@ -154,7 +154,7 @@
   Name keyName = getKeyName(identity, keyId);
 
   if (!hasKey(identity, keyId))
-    throw Pib::Error("No key");
+    BOOST_THROW_EXCEPTION(Pib::Error("No key"));
 
   m_defaultKey[identity] = keyName;
 }
@@ -164,7 +164,7 @@
 {
   auto it = m_defaultKey.find(identity);
   if (it == m_defaultKey.end())
-    throw Pib::Error("No default key");
+    BOOST_THROW_EXCEPTION(Pib::Error("No default key"));
 
   return it->second.get(-1);
 }
@@ -208,7 +208,7 @@
 PibMemory::getCertificate(const Name& certName) const
 {
   if (!hasCertificate(certName))
-    throw Pib::Error("No cert");
+    BOOST_THROW_EXCEPTION(Pib::Error("No cert"));
 
   auto it = m_certs.find(certName);
   return it->second;
@@ -231,7 +231,7 @@
 PibMemory::setDefaultCertificateOfKey(const Name& identity, const name::Component& keyId, const Name& certName)
 {
   if (!hasCertificate(certName))
-    throw Pib::Error("No cert");
+    BOOST_THROW_EXCEPTION(Pib::Error("No cert"));
 
   Name keyName = getKeyName(identity, keyId);
   m_defaultCert[keyName] = certName;
@@ -244,11 +244,11 @@
 
   auto it = m_defaultCert.find(keyName);
   if (it == m_defaultCert.end())
-    throw Pib::Error("No default certificate");
+    BOOST_THROW_EXCEPTION(Pib::Error("No default certificate"));
 
   auto certIt = m_certs.find(it->second);
   if (certIt == m_certs.end())
-    throw Pib::Error("No default certificate");
+    BOOST_THROW_EXCEPTION(Pib::Error("No default certificate"));
   else
     return certIt->second;
 }
