From cd314a1fcd44338cfa75d47a6a4c1fe754889f74 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Tue, 25 Nov 2014 08:53:16 +0200
Subject: Get rid of trailing newlines in error messages

---
 odb/exceptions.cxx | 7 ++-----
 1 file 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 ();
-- 
cgit v1.1