Enhance exception throwing with Boost Exception library

Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/security/digest-sha256.cpp b/src/security/digest-sha256.cpp
index 3af551a..6e37eb5 100644
--- a/src/security/digest-sha256.cpp
+++ b/src/security/digest-sha256.cpp
@@ -32,7 +32,7 @@
   : Signature(signature)
 {
   if (getType() != tlv::DigestSha256)
-    throw Error("Incorrect signature type");
+    BOOST_THROW_EXCEPTION(Error("Incorrect signature type"));
 }
 
 } // namespace ndn