summaryrefslogtreecommitdiff
path: root/libpqpp/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/connection.cpp')
-rw-r--r--libpqpp/connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpqpp/connection.cpp b/libpqpp/connection.cpp
index 98f9054..51aac63 100644
--- a/libpqpp/connection.cpp
+++ b/libpqpp/connection.cpp
@@ -18,7 +18,7 @@ PQ::Connection::Connection(const std::string & info) :
rolledback(false)
{
if (PQstatus(conn) != CONNECTION_OK) {
- throw ConnectionError();
+ throw ConnectionError(conn);
}
PQsetNoticeProcessor(conn, noNoticeProcessor, NULL);
}
@@ -100,11 +100,11 @@ PQ::Connection::ping() const
{
if (PQstatus(conn) != CONNECTION_OK) {
if (inTx()) {
- throw ConnectionError();
+ throw ConnectionError(conn);
}
PQreset(conn);
if (PQstatus(conn) != CONNECTION_OK) {
- throw ConnectionError();
+ throw ConnectionError(conn);
}
}
}