Make sure status() returns a message also on bad connection

Closes #2173.
This commit is contained in:
Sandro Santilli 2014-03-06 09:56:13 +01:00 committed by Dane Springmeyer
parent d58def6cdb
commit 749118cdee

View file

@ -127,7 +127,8 @@ public:
std::string status;
if (conn_)
{
status = PQerrorMessage(conn_);
if ( isOK() ) return PQerrorMessage(conn_);
else return "Bad connection";
}
else
{