Improve error handling
This commit is contained in:
parent
457b09f15c
commit
80272e81c3
5 changed files with 68 additions and 84 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue