Add full error with more detail (#479) (#486)

* add full error with more detail (#479)

* Preparing version 1.10.0 Snap (#478) (#487)

* update to OrcaSQL ESRP Code Sign

* code sign for non-windows

* remove pr trigger for snap

* remove trigger

* update date esrp key for linux
This commit is contained in:
nasc17 2023-12-18 09:50:35 -08:00 коммит произвёл GitHub
Родитель 314db93aba
Коммит d15e57687f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -297,14 +297,14 @@ class PostgreSQLConnection(ServerConnection):
"""
Get the message from DatabaseError instance
"""
# If error.diag.message_primary is not None, return it.
if error.diag and error.diag.message_primary:
return error.diag.message_primary
# If error.args exists and has at least one element, return the first element as the error message.
elif hasattr(error, 'args') and error.args and len(error.args) > 0:
if hasattr(error, 'args') and error.args and len(error.args) > 0:
return error.args[0]
# If error.diag.message_primary is not None, return it.
elif error.diag and error.diag.message_primary:
return error.diag.message_primary
# If neither is available, return a generic error message.
else:
return "An unspecified database error occurred."