summaryrefslogtreecommitdiff
path: root/libpqpp/error.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-02 21:21:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-02 21:21:57 +0000
commit0768666d941af819c8fc20fc872609d4107c7bd2 (patch)
tree50b46946e1eb2a52189670661054744e3c5664fc /libpqpp/error.cpp
parentTidy up and alias glibmm and libxml++ refs (diff)
downloadlibdbpp-postgresql-0768666d941af819c8fc20fc872609d4107c7bd2.tar.bz2
libdbpp-postgresql-0768666d941af819c8fc20fc872609d4107c7bd2.tar.xz
libdbpp-postgresql-0768666d941af819c8fc20fc872609d4107c7bd2.zip
Propergate connection error details into DB::Error and add test
Diffstat (limited to 'libpqpp/error.cpp')
-rw-r--r--libpqpp/error.cpp5
1 files changed, 5 insertions, 0 deletions
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))
+{
+}
+