aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/sqlite/error.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/odb/sqlite/error.cxx b/odb/sqlite/error.cxx
index 6107427..6fae9d5 100644
--- a/odb/sqlite/error.cxx
+++ b/odb/sqlite/error.cxx
@@ -83,6 +83,12 @@ namespace odb
if (m.empty ())
m = sqlite3_errmsg (h);
+ // Get rid of a trailing newline if there is one.
+ //
+ string::size_type n (m.size ());
+ if (n != 0 && m[n - 1] == '\n')
+ m.resize (n - 1);
+
throw database_exception (e, ee, m);
}
}