mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-08-04 04:10:09 +03:00
Merge 82e4219260
into 4e92322d74
This commit is contained in:
commit
fbd0a539dd
|
@ -190,8 +190,9 @@ pq_raise(connectionObject *conn, cursorObject *curs, PGresult **pgres)
|
||||||
raise and a meaningful message is better than an empty one.
|
raise and a meaningful message is better than an empty one.
|
||||||
Note: it can happen without it being our error: see ticket #82 */
|
Note: it can happen without it being our error: see ticket #82 */
|
||||||
if (err == NULL || err[0] == '\0') {
|
if (err == NULL || err[0] == '\0') {
|
||||||
PyErr_SetString(DatabaseError,
|
PyErr_Format(DatabaseError,
|
||||||
"error with no message from the libpq");
|
"error code %s with no error message from libpq",
|
||||||
|
PQresStatus(pgres == NULL ? PQstatus(conn->pgconn) : PQresultStatus(*pgres)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user