Improve error handling

This commit is contained in:
eelke 2022-08-17 18:18:10 +02:00
parent 457b09f15c
commit 80272e81c3
5 changed files with 68 additions and 84 deletions

View file

@ -246,7 +246,7 @@ void Connection::throwError(PGresult *result) const
{
auto state = PQresultStatus(result);
if (state == PGRES_BAD_RESPONSE)
; // communication problem
throw PgException("Communication issue");
else if (state == PGRES_FATAL_ERROR)
{
auto details = Pgsql::ErrorDetails::createErrorDetailsFromPGresult(result);