From 0768666d941af819c8fc20fc872609d4107c7bd2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 2 Dec 2015 21:21:57 +0000 Subject: Propergate connection error details into DB::Error and add test --- libpqpp/error.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpqpp/error.cpp') diff --git a/libpqpp/error.cpp b/libpqpp/error.cpp index 0886238..8664b70 100644 --- a/libpqpp/error.cpp +++ b/libpqpp/error.cpp @@ -26,3 +26,8 @@ PQ::Error::what() const throw() return msg ? msg : "No message"; } +PQ::ConnectionError::ConnectionError(const PGconn * conn) : + PQ::Error(PQerrorMessage(conn)) +{ +} + -- cgit v1.2.3