Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/security/signature-sha256-with-rsa.cpp b/src/security/signature-sha256-with-rsa.cpp
index cda06e6..572257d 100644
--- a/src/security/signature-sha256-with-rsa.cpp
+++ b/src/security/signature-sha256-with-rsa.cpp
@@ -32,17 +32,17 @@
: Signature(signature)
{
if (getType() != tlv::SignatureSha256WithRsa)
- 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
SignatureSha256WithRsa::unsetKeyLocator()
{
- throw Error("KeyLocator cannot be reset for SignatureSha256WithRsa");
+ BOOST_THROW_EXCEPTION(Error("KeyLocator cannot be reset for SignatureSha256WithRsa"));
}
} // namespace ndn