aboutsummaryrefslogtreecommitdiff
path: root/bpkg/auth.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-15 16:26:23 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-16 13:03:13 +0300
commit8b69cab7c802a0d0bd9cc90da33002dd5f86042f (patch)
treeb7bc7c020ffb440b5b8f203ed4a91d9f0f5793a2 /bpkg/auth.cxx
parent564801acd608513adb07244829735ffb2669685d (diff)
Add io_error alias for std::ios_base::failure
Diffstat (limited to 'bpkg/auth.cxx')
-rw-r--r--bpkg/auth.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx
index 6ef9751..75cdb45 100644
--- a/bpkg/auth.cxx
+++ b/bpkg/auth.cxx
@@ -4,7 +4,6 @@
#include <bpkg/auth>
-#include <ios>
#include <ratio>
#include <limits> // numeric_limits
#include <cstring> // strlen(), strcmp()
@@ -131,7 +130,7 @@ namespace bpkg
const size_t n (19);
if (!(s.size () > n && s.compare (0, n, "SHA256 Fingerprint=") == 0))
- throw ifdstream::failure ("");
+ throw io_error ("");
string fp;
@@ -141,7 +140,7 @@ namespace bpkg
}
catch (const invalid_argument&)
{
- throw ifdstream::failure ("");
+ throw io_error ("");
}
if (pr.wait ())
@@ -150,7 +149,7 @@ namespace bpkg
// Fall through.
//
}
- catch (const ios_base::failure&)
+ catch (const io_error&)
{
// Child exit status doesn't matter. Just wait for the process
// completion and fall through.
@@ -407,7 +406,7 @@ namespace bpkg
// Fall through.
//
}
- catch (const ios_base::failure&)
+ catch (const io_error&)
{
// Child exit status doesn't matter. Just wait for the process
// completion and fall through.
@@ -555,7 +554,7 @@ namespace bpkg
ofs << *pem;
ofs.close ();
}
- catch (const ofdstream::failure& e)
+ catch (const io_error& e)
{
fail << "unable to write certificate to " << f << ": " << e.what ();
}
@@ -641,7 +640,7 @@ namespace bpkg
ofs << *cert_pem;
ofs.close ();
}
- catch (const ofdstream::failure& e)
+ catch (const io_error& e)
{
fail << "unable to save certificate to temporary file " << f
<< ": " << e.what ();
@@ -713,7 +712,7 @@ namespace bpkg
// Fall through.
//
}
- catch (const ios_base::failure&)
+ catch (const io_error&)
{
// Child exit status doesn't matter. Just wait for the process
// completion and fall through.
@@ -794,7 +793,7 @@ namespace bpkg
// Fall through.
//
}
- catch (const iostream::failure&)
+ catch (const io_error&)
{
// Child exit status doesn't matter. Just wait for the process
// completion and fall through.