aboutsummaryrefslogtreecommitdiff
path: root/mod
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 /mod
parentde29ab0fc899955304fc65ae688f69b6ed805bc9 (diff)
Make use of operator<<(ostream, exception)
Diffstat (limited to 'mod')
-rw-r--r--mod/database-module.cxx2
-rw-r--r--mod/mod-repository-root.cxx4
2 files changed, 4 insertions, 2 deletions
diff --git a/mod/database-module.cxx b/mod/database-module.cxx
index 8c701b1..6fd5025 100644
--- a/mod/database-module.cxx
+++ b/mod/database-module.cxx
@@ -41,7 +41,7 @@ namespace brep
if (retry_-- > 0)
{
MODULE_DIAG;
- l1 ([&]{trace << e.what () << "; " << retry_ + 1 << " retries left";});
+ l1 ([&]{trace << e << "; " << retry_ + 1 << " retries left";});
throw retry ();
}
diff --git a/mod/mod-repository-root.cxx b/mod/mod-repository-root.cxx
index c51c61c..84c1ed1 100644
--- a/mod/mod-repository-root.cxx
+++ b/mod/mod-repository-root.cxx
@@ -177,7 +177,9 @@ namespace brep
// Note that the server_error exception is handled internally by the
// module::handle() function call.
//
- throw runtime_error (string (name) + ": " + e.what ());
+ ostringstream os;
+ os << name << ": " << e;
+ throw runtime_error (os.str ());
}
};