EVT_PAINT handler raising excption, gets called repeatedly

Christian K. ckkart at hoc.net
Tue Jul 3 06:54:57 PDT 2007


Charl P. Botha wrote:
> Dear all,
> 
> I'm running on Windows XP SP2 and wxPython 2.6.3.3.  If an EVT_PAINT
> handler is raising an exception (and thus not returning normally), is
> there any reason why it would then be repeatedly called?  If I catch
> the exception inside the event handler, it behaves as expected.

EVT_PAINT handlers are obviously called by the wxPython event system, so 
there is no way to put try: except around the call. Where in your code 
have you hoped that exception handling could catch exceptions occuring 
inside the handler?

Christian






More information about the wxpython-users mailing list