Enhance exception throwing with Boost Exception library

Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/security/signature-sha256-with-ecdsa.cpp b/src/security/signature-sha256-with-ecdsa.cpp
index 642912b..7de71a2 100644
--- a/src/security/signature-sha256-with-ecdsa.cpp
+++ b/src/security/signature-sha256-with-ecdsa.cpp
@@ -32,17 +32,17 @@
   : Signature(signature)
 {
   if (getType() != tlv::SignatureSha256WithEcdsa)
-    throw Error("Incorrect signature type");
+    BOOST_THROW_EXCEPTION(Error("Incorrect signature type"));
 
   if (!hasKeyLocator()) {
-    throw Error("KeyLocator is missing");
+    BOOST_THROW_EXCEPTION(Error("KeyLocator is missing"));
   }
 }
 
 void
 SignatureSha256WithEcdsa::unsetKeyLocator()
 {
-  throw Error("KeyLocator cannot be reset for SignatureSha256WithEcdsa");
+  BOOST_THROW_EXCEPTION(Error("KeyLocator cannot be reset for SignatureSha256WithEcdsa"));
 }
 
 } // namespace ndn