aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-11-25 08:53:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-25 08:53:16 +0200
commitcd314a1fcd44338cfa75d47a6a4c1fe754889f74 (patch)
tree77fc051c97f3e60859e1fea90bdeec8d709281a5
parent8d4d2568f356cb9beb1553bf58ad69c1c800b996 (diff)
Get rid of trailing newlines in error messages
-rw-r--r--odb/exceptions.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index ca9e84c..88721c5 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -380,13 +380,12 @@ namespace odb
<< failed () << " failed"
<< (fatal_ ? ", fatal" : "") << ":";
- bool nl (true);
for (iterator i (begin ()); i != end ();)
{
size_t p (i->position ());
const odb::exception& e (i->exception ());
- os << (nl ? "\n" : "");
+ os << '\n';
if (!i->maybe ())
{
@@ -412,9 +411,7 @@ namespace odb
os << '[' << p << '-' << (p + n) << "] (some)";
}
- const char* w (e.what ());
- os << ' ' << w;
- nl = (w[strlen (w) - 1] != '\n');
+ os << ' ' << e.what ();
}
what_ = os.str ();