Merge pull request #2174 from strk/2.2.x-handle-bad-connection
Make sure status() returns a message also on bad connection
This commit is contained in:
commit
44ef0324f0
1 changed files with 2 additions and 1 deletions
|
@ -128,7 +128,8 @@ public:
|
||||||
std::string status;
|
std::string status;
|
||||||
if (conn_)
|
if (conn_)
|
||||||
{
|
{
|
||||||
status = PQerrorMessage(conn_);
|
if ( isOK() ) return PQerrorMessage(conn_);
|
||||||
|
else return "Bad connection";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue