aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-22 15:54:04 -0400
committerJack Lloyd <[email protected]>2018-08-22 15:54:04 -0400
commit56468f8a389350516de67005c8e780c4f7743aab (patch)
treef151e3421fe9532087c9b62468e1a02344086478 /src/lib/x509
parent2fc2598ebab23aa63f7be30c8a2eff6afb262fb3 (diff)
Simplify exception messages
Remove "Invalid argument" and "Decoding Error" prefixes
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/x509_ext.cpp2
-rw-r--r--src/lib/x509/x509_obj.cpp2
-rw-r--r--src/lib/x509/x509cert.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index 122be2885..5a5ffa177 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -101,7 +101,7 @@ Extensions::create_extn_obj(const OID& oid,
}
catch(Decoding_Error& e)
{
- throw Decoding_Error("Decoding X.509 extension " + oid.as_string() + " failed", e.what());
+ throw Decoding_Error("Decoding X.509 extension " + oid.as_string(), e);
}
return extn;
}
diff --git a/src/lib/x509/x509_obj.cpp b/src/lib/x509/x509_obj.cpp
index 060453072..49d7fcc60 100644
--- a/src/lib/x509/x509_obj.cpp
+++ b/src/lib/x509/x509_obj.cpp
@@ -85,7 +85,7 @@ void X509_Object::load_data(DataSource& in)
}
catch(Decoding_Error& e)
{
- throw Decoding_Error(PEM_label() + " decoding failed: " + e.what());
+ throw Decoding_Error(PEM_label() + " decoding", e);
}
}
diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp
index ddfe5d5b2..9ed521f16 100644
--- a/src/lib/x509/x509cert.cpp
+++ b/src/lib/x509/x509cert.cpp
@@ -650,7 +650,7 @@ std::unique_ptr<Public_Key> X509_Certificate::load_subject_public_key() const
}
catch(std::exception& e)
{
- throw Decoding_Error("X509_Certificate::load_subject_public_key", e.what());
+ throw Decoding_Error("X509_Certificate::load_subject_public_key", e);
}
}