Ensure that the query tool should display the proper error message while terminating the active session. Fixes #3591

This commit is contained in:
Yogesh Mahajan 2020-06-22 17:08:55 +05:30 committed by Akshay Joshi
parent 6012f49919
commit caebdcfa91
2 changed files with 7 additions and 2 deletions

View File

@ -24,6 +24,7 @@ Housekeeping
Bug fixes
*********
| `Issue #3591 <https://redmine.postgresql.org/issues/3591>`_ - Ensure that the query tool should display the proper error message while terminating the active session.
| `Issue #3669 <https://redmine.postgresql.org/issues/3669>`_ - Ensure that proper error should be displayed for the deleted node.
| `Issue #3787 <https://redmine.postgresql.org/issues/3787>`_ - Disabled the Stop process button after clicking it and added a message 'Terminating the process...' to notify the user.
| `Issue #4226 <https://redmine.postgresql.org/issues/4226>`_ - Fixed an issue where select all checkbox only selects the first 50 tables.

View File

@ -1404,15 +1404,19 @@ Failed to reset the connection to the server due to following error:
is_error = False
try:
status = self._wait_timeout(self.conn)
except psycopg2.OperationalError as op_er:
errmsg = \
self._formatted_exception_msg(op_er, formatted_exception_msg)
is_error = True
except psycopg2.Error as pe:
errmsg = self._formatted_exception_msg(pe, formatted_exception_msg)
is_error = True
if self.conn.closed:
raise ConnectionLost(
self.manager.sid,
self.db,
self.conn_id[5:]
)
errmsg = self._formatted_exception_msg(pe, formatted_exception_msg)
is_error = True
except OSError as e:
# Bad File descriptor
if e.errno == 9: