Re: Minor bug and suggested fix - 1.2 and 1.3.5

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Minor bug and suggested fix - 1.2 and 1.3.5
Дата
Msg-id FED2B709E3270E4B903EB0175A49BCB104758F@dogbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на Minor bug and suggested fix - 1.2 and 1.3.5  ("Mark A. Taff" <mark@libertycreek.net>)
Ответы Re: Minor bug and suggested fix - 1.2 and 1.3.5
Список pgadmin-hackers
 
-----Original Message-----
From: Mark A. Taff [mailto:mark@libertycreek.net]
Sent: 14 February 2002 15:48
To: pgadmin-hackers
Subject: [pgadmin-hackers] Minor bug and suggested fix - 1.2 and 1.3.5

All,

            I've found a minor bug in 1.2 and 1.3.5.  When an uncorrected error occurs and LogError is called after StartMsg has been called, EndMsg is not always called, and so the cursor does not always return to a normal cursor.  Rather than trying to check and correct for this throughout the code, I've just done it once in the LogError sub.  I've pasted patched code based on 1.3.5 for your consideration below.

 

Regards,

 

Mark Taff

 

*** Begin patch for pgAdmin2.basMisc.LogError v1.3.5 ***

 

Public Sub LogError(lError As Long, szError As String, szRoutine As String)

'No logging here, if anythings going wrong then we want the real error

 

  frmMain.svr.LogEvent "Error in " & szRoutine & ": " & lError & " - " & szError, etErrors

  MsgBox "An error has occured in " & szRoutine & ":" & vbCrLf & vbCrLf & "Number: " & lError & vbCrLf & "Description: " & szError, vbExclamation, App.Title & " Error"

 

  'If we get here, EndMsg may not fire, so give the user a normal cursor...

  Screen.MousePointer = vbDefault

 

End Sub

 

*** End patch *** 

 

It might be an idea to set the status message sensibly as well - perhaps take a look at EndMsg and see what else it does. I *think* the only other thing is display the timings....

 

 

Regards, Dave. 

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: "Mark A. Taff"
Дата:
Сообщение: Minor bug and suggested fix - 1.2 and 1.3.5
Следующее
От: "Mark A. Taff"
Дата:
Сообщение: Re: Minor bug and suggested fix - 1.2 and 1.3.5