aboutsummaryrefslogtreecommitdiff
path: root/load/load.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-06 03:23:20 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-09 21:37:04 +0300
commit5db146ef751507efd4f9556c9a0ab3bb5e88f7c5 (patch)
tree4814f25c7101588a7dd7433fac4f797972295f95 /load/load.cxx
parentde29ab0fc899955304fc65ae688f69b6ed805bc9 (diff)
Make use of operator<<(ostream, exception)
Diffstat (limited to 'load/load.cxx')
-rw-r--r--load/load.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/load/load.cxx b/load/load.cxx
index b2c19f3..ee258fa 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -233,7 +233,7 @@ load_repositories (path p)
}
catch (const io_error& e)
{
- cerr << "error: unable to read " << p << ": " << e.what () << endl;
+ cerr << "error: unable to read " << p << ": " << e << endl;
throw failed ();
}
@@ -298,8 +298,7 @@ repository_info (const options& lo, const string& rl, const cstrings& options)
}
catch (const process_error& e)
{
- cerr << "error: unable to execute " << args[0] << ": " << e.what ()
- << endl;
+ cerr << "error: unable to execute " << args[0] << ": " << e << endl;
if (e.child ())
exit (1);
@@ -337,7 +336,7 @@ load_packages (const shared_ptr<repository>& rp, database& db)
}
catch (const io_error& e)
{
- cerr << "error: unable to read " << p << ": " << e.what () << endl;
+ cerr << "error: unable to read " << p << ": " << e << endl;
throw failed ();
}
@@ -493,7 +492,7 @@ load_repositories (const shared_ptr<repository>& rp, database& db)
}
catch (const io_error& e)
{
- cerr << "error: unable to read " << p << ": " << e.what () << endl;
+ cerr << "error: unable to read " << p << ": " << e << endl;
throw failed ();
}
@@ -938,7 +937,7 @@ certificate_info (const options& lo,
catch (const process_error& e)
{
cerr << "error: unable to fetch certificate information for "
- << rl.canonical_name () << ": " << e.what () << endl;
+ << rl.canonical_name () << ": " << e << endl;
// Fall through.
}
@@ -1094,7 +1093,7 @@ catch (const database_locked&)
}
catch (const recoverable& e)
{
- cerr << "database recoverable error: " << e.what () << endl;
+ cerr << "database recoverable error: " << e << endl;
return 3;
}
catch (const cli::exception& e)
@@ -1110,6 +1109,6 @@ catch (const failed&)
//
catch (const std::exception& e)
{
- cerr << "error: " << e.what () << endl;
+ cerr << "error: " << e << endl;
return 1;
}