From 64f84951d0e5c1d3352ba7b9f6c894eac72424c8 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 6 Jan 2017 03:23:55 +0300 Subject: Make use of operator<<(ostream, exception) --- bpkg/auth.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'bpkg/auth.cxx') diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index b736dd6..da5b293 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -165,7 +165,7 @@ namespace bpkg catch (const process_error& e) { error << "unable to calculate certificate fingerprint for " - << rl.canonical_name () << ": " << e.what (); + << rl.canonical_name () << ": " << e; // Fall through. } @@ -420,8 +420,7 @@ namespace bpkg // parsing diagnostics since we were probably parsing garbage. // if (pr.wait ()) - fail << "invalid certificate for " << repo << ": " << e.what () - << endf; + fail << "invalid certificate for " << repo << ": " << e << endf; // Fall through. } @@ -432,7 +431,7 @@ namespace bpkg } catch (const process_error& e) { - error << "unable to parse certificate for " << repo << ": " << e.what (); + error << "unable to parse certificate for " << repo << ": " << e; // Fall through. } @@ -555,7 +554,7 @@ namespace bpkg } catch (const io_error& e) { - fail << "unable to write certificate to " << f << ": " << e.what (); + fail << "unable to write certificate to " << f << ": " << e; } } @@ -642,11 +641,11 @@ namespace bpkg catch (const io_error& e) { fail << "unable to save certificate to temporary file " << f - << ": " << e.what (); + << ": " << e; } catch (const system_error& e) { - fail << "unable to obtain temporary file: " << e.what (); + fail << "unable to obtain temporary file: " << e; } } else @@ -726,7 +725,7 @@ namespace bpkg catch (const process_error& e) { error << "unable to authenticate repository " - << rl.canonical_name () << ": " << e.what (); + << rl.canonical_name () << ": " << e; // Fall through. } @@ -807,7 +806,7 @@ namespace bpkg } catch (const process_error& e) { - error << "unable to sign repository " << r << ": " << e.what (); + error << "unable to sign repository " << r << ": " << e; // Fall through. } -- cgit v1.1