aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cert/x509/name_constraint.cpp4
-rw-r--r--src/lib/cert/x509/ocsp_types.cpp2
-rw-r--r--src/lib/cert/x509/x509_ext.cpp8
-rw-r--r--src/lib/utils/exceptn.h10
4 files changed, 17 insertions, 7 deletions
diff --git a/src/lib/cert/x509/name_constraint.cpp b/src/lib/cert/x509/name_constraint.cpp
index a1ed19856..83f6386ba 100644
--- a/src/lib/cert/x509/name_constraint.cpp
+++ b/src/lib/cert/x509/name_constraint.cpp
@@ -33,7 +33,7 @@ GeneralName::GeneralName(const std::string& v) : GeneralName()
void GeneralName::encode_into(class DER_Encoder&) const
{
- throw Exception("General Name encoding not implemented");
+ throw Not_Implemented("GeneralName encoding");
}
void GeneralName::decode_from(class BER_Decoder& ber)
@@ -249,7 +249,7 @@ GeneralSubtree::GeneralSubtree(const std::string& v) : GeneralSubtree()
void GeneralSubtree::encode_into(class DER_Encoder&) const
{
- throw std::runtime_error("General Subtree encoding not implemented");
+ throw Not_Implemented("General Subtree encoding");
}
void GeneralSubtree::decode_from(class BER_Decoder& ber)
diff --git a/src/lib/cert/x509/ocsp_types.cpp b/src/lib/cert/x509/ocsp_types.cpp
index ba5b825f7..d470c2fa1 100644
--- a/src/lib/cert/x509/ocsp_types.cpp
+++ b/src/lib/cert/x509/ocsp_types.cpp
@@ -92,7 +92,7 @@ void CertID::decode_from(class BER_Decoder& from)
void SingleResponse::encode_into(class DER_Encoder&) const
{
- throw Exception("Not implemented (SingleResponse::encode_into)");
+ throw Not_Implemented("SingleResponse::encode_into");
}
void SingleResponse::decode_from(class BER_Decoder& from)
diff --git a/src/lib/cert/x509/x509_ext.cpp b/src/lib/cert/x509/x509_ext.cpp
index 85d40bf21..986254bc9 100644
--- a/src/lib/cert/x509/x509_ext.cpp
+++ b/src/lib/cert/x509/x509_ext.cpp
@@ -461,7 +461,7 @@ void Extended_Key_Usage::contents_to(Data_Store& subject, Data_Store&) const
*/
std::vector<byte> Name_Constraints::encode_inner() const
{
- throw std::runtime_error("Name_Constraints encoding not implemented");
+ throw Not_Implemented("Name_Constraints encoding");
}
@@ -777,7 +777,7 @@ void CRL_ReasonCode::contents_to(Data_Store& info, Data_Store&) const
std::vector<byte> CRL_Distribution_Points::encode_inner() const
{
- throw Exception("CRL_Distribution_Points encoding not implemented");
+ throw Not_Implemented("CRL_Distribution_Points encoding");
}
void CRL_Distribution_Points::decode_inner(const std::vector<byte>& buf)
@@ -800,7 +800,7 @@ void CRL_Distribution_Points::contents_to(Data_Store& info, Data_Store&) const
void CRL_Distribution_Points::Distribution_Point::encode_into(class DER_Encoder&) const
{
- throw Exception("CRL_Distribution_Points encoding not implemented");
+ throw Not_Implemented("CRL_Distribution_Points encoding");
}
void CRL_Distribution_Points::Distribution_Point::decode_from(class BER_Decoder& ber)
@@ -815,7 +815,7 @@ void CRL_Distribution_Points::Distribution_Point::decode_from(class BER_Decoder&
std::vector<byte> Unknown_Critical_Extension::encode_inner() const
{
- throw Exception("Unknown_Critical_Extension encoding not implemented");
+ throw Not_Implemented("Unknown_Critical_Extension encoding");
}
void Unknown_Critical_Extension::decode_inner(const std::vector<byte>& buf)
diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h
index b6797f0f6..193d78ce9 100644
--- a/src/lib/utils/exceptn.h
+++ b/src/lib/utils/exceptn.h
@@ -215,6 +215,16 @@ struct BOTAN_DLL Self_Test_Failure : public Internal_Error
{}
};
+/**
+* Not Implemented Exception
+*/
+struct BOTAN_DLL Not_Implemented : public Exception
+ {
+ explicit Not_Implemented(const std::string& err) :
+ Exception("Not implemented", err)
+ {}
+ };
+
}
#endif