summaryrefslogtreecommitdiff
path: root/src/certificate_chain.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-19 23:30:04 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-19 23:30:04 +0100
commit6ea37804a7f9dd72a29a25e7594a39fa47f53192 (patch)
treeb78bfdc3ef2ba3d61dfb3ce0930f741ec92548a3 /src/certificate_chain.cc
parentf6b789850b0cd50971707084632c4ec08e145d0f (diff)
Use std::runtime_error instead of our own StringError as
a) it does the same job and b) its type and what() survive the boundary between the libdcp .so and the main DCP-o-matic executable. Before this StringError-derived exceptions caught by DCP-o-matic were only recognised as std::exceptions (without the what()) message. I don't know why this happens, but this works around it.
Diffstat (limited to 'src/certificate_chain.cc')
-rw-r--r--src/certificate_chain.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/certificate_chain.cc b/src/certificate_chain.cc
index c0bfd52f..b37c07bf 100644
--- a/src/certificate_chain.cc
+++ b/src/certificate_chain.cc
@@ -46,6 +46,7 @@
using std::string;
using std::ofstream;
using std::ifstream;
+using std::runtime_error;
using std::stringstream;
using namespace dcp;
@@ -535,7 +536,7 @@ CertificateChain::add_signature_value (xmlpp::Node* parent, string ns) const
);
if (signature_context->signKey == 0) {
- throw StringError ("could not read private key");
+ throw runtime_error ("could not read private key");
}
/* XXX: set key name to the PEM string: this can't be right! */