diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
| commit | 83591a4390db550a7d1495b9699c62315e2d7710 (patch) | |
| tree | 29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/kdm.cc | |
| parent | 3a148fab61d2b23379589a4f0f256c21950742b8 (diff) | |
Throw better file errors (with numbers).
Diffstat (limited to 'src/kdm.cc')
| -rw-r--r-- | src/kdm.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -52,13 +52,13 @@ KDM::KDM (boost::filesystem::path kdm, boost::filesystem::path private_key) FILE* private_key_file = fopen_boost (private_key, "r"); if (!private_key_file) { - throw FileError ("could not find RSA private key file", private_key); + throw FileError ("could not find RSA private key file", private_key, errno); } RSA* rsa = PEM_read_RSAPrivateKey (private_key_file, 0, 0, 0); fclose (private_key_file); if (!rsa) { - throw FileError ("could not read RSA private key file", private_key); + throw FileError ("could not read RSA private key file", private_key, errno); } /* Use it to decrypt the keys */ |
