mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 06:05:49 -06:00
change pgConn, frmLog, frmStatus
При возникновении ошибки "server closed the connection unexpectedly" сообщение об этом не выводиться на экран. Т.к. происходило падение pgAdmin3 В frmLog добалены сохраняемые пользовательские фильтры. По кнопке Add текущий фильтр сохраняется. Имя задается в ComboBox. В окне "Status Server" устанавливается парамер "SET statement_timeout=10000;" чтобы избежать зависания функции pg_query_state.
This commit is contained in:
parent
4db8267ae6
commit
4684ada1ac
12 changed files with 505 additions and 49 deletions
|
|
@ -976,13 +976,20 @@ void pgConn::LogError(const bool quiet)
|
|||
{
|
||||
if (conn)
|
||||
{
|
||||
if (quiet)
|
||||
bool abnormal_termination = false;
|
||||
wxString err = GetLastError().Trim();
|
||||
if (err.Find("server closed the connection unexpectedly") >= 0) {
|
||||
//Close();
|
||||
//connStatus = PGCONN_BROKEN;
|
||||
abnormal_termination = true;
|
||||
}
|
||||
if (quiet || abnormal_termination)
|
||||
{
|
||||
wxLogQuietError(wxT("%s"), GetLastError().Trim().c_str());
|
||||
wxLogQuietError(wxT("%s"), err.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogError(wxT("%s"), GetLastError().Trim().c_str());
|
||||
wxLogError(wxT("%s"), err.c_str());
|
||||
IsAlive();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue