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
parent f2021971f0
commit d36c39d9be

View file

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