summaryrefslogtreecommitdiff
path: root/src/certificates.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
commit83591a4390db550a7d1495b9699c62315e2d7710 (patch)
tree29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/certificates.cc
parent3a148fab61d2b23379589a4f0f256c21950742b8 (diff)
Throw better file errors (with numbers).
Diffstat (limited to 'src/certificates.cc')
-rw-r--r--src/certificates.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/certificates.cc b/src/certificates.cc
index aa7972a5..2f5d47fd 100644
--- a/src/certificates.cc
+++ b/src/certificates.cc
@@ -19,6 +19,7 @@
#include <sstream>
#include <vector>
+#include <cerrno>
#include <boost/algorithm/string.hpp>
#include <openssl/x509.h>
#include <openssl/ssl.h>
@@ -52,7 +53,7 @@ Certificate::Certificate (boost::filesystem::path filename)
{
FILE* f = fopen_boost (filename, "r");
if (!f) {
- throw FileError ("could not open file", filename);
+ throw FileError ("could not open file", filename, errno);
}
if (!PEM_read_X509 (f, &_certificate, 0, 0)) {