I am having problems with exceptions generated inside wx.App.MainLoop, after an upgrade from wxPython 2.4 to the current version.
Any unhandled exceptions are silently ‘disappearing’.
I have verified it by raising a test exception just before wx.App.MainLoop and it is printed to the console, but if I raise an exceptioin inside a window event such as onIconize inside the main window the excption is never printed, but the event terminates right after the exception, and the program keeps on running…
It is getting really annoying as I am having to use pdb.set_trace at the start of a problematic event to get a trace for any exceptions.
I would like all exceptions to be printed like they used to be.
I can’t see what is causing this so maybe someone here will know.
I am having problems with exceptions generated inside wx.App.MainLoop, after an upgrade from wxPython 2.4 to the current version.
Any unhandled exceptions are silently 'disappearing'.
I have verified it by raising a test exception just before wx.App.MainLoop and it is printed to the console, but if I raise an exceptioin inside a window event such as onIconize inside the main window the excption is never printed, but the event terminates right after the exception, and the program keeps on running..
It is getting really annoying as I am having to use pdb.set_trace at the start of a problematic event to get a trace for any exceptions.
I would like all exceptions to be printed like they used to be.
I can't see what is causing this so maybe someone here will know.
Leith
Does anyone know if the old defualt of calling PyErr_Print() on reuturn
from Python code has changed in the C++ code?
Is there a Python function one can override/hook to provide custom
exception handling code?
Leith
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Mike
Driscoll
···
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
Sent: Thursday, 8 January 2009 4:15 a.m.
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Leith Bade wrote:
I am having problems with exceptions generated inside wx.App.MainLoop,
after an upgrade from wxPython 2.4 to the current version.
Any unhandled exceptions are silently 'disappearing'.
I have verified it by raising a test exception just before
wx.App.MainLoop and it is printed to the console, but if I raise an
exceptioin inside a window event such as onIconize inside the main
window the excption is never printed, but the event terminates right
after the exception, and the program keeps on running..
It is getting really annoying as I am having to use pdb.set_trace at
the start of a problematic event to get a trace for any exceptions.
I would like all exceptions to be printed like they used to be.
I can't see what is causing this so maybe someone here will know.
Can someone point me to where PyErr_Print() is called in the SVN, as I
am trying to find the excpetion handling code and see what it is doing.
Leith
From:
wxpython-users-bounces+leith.bade=silentone.com@lists.wxwidgets.org
[mailto:wxpython-users-bounces+leith.bade=silentone.com@lists.wxwidgets.
org] On Behalf Of Leith Bade
···
-----Original Message-----
Sent: Thursday, 8 January 2009 11:11 a.m.
To: wxpython-users@lists.wxwidgets.org
Subject: RE: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Does anyone know if the old defualt of calling PyErr_Print() on reuturn
from Python code has changed in the C++ code?
Is there a Python function one can override/hook to provide custom
exception handling code?
Leith
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Mike
Driscoll
Sent: Thursday, 8 January 2009 4:15 a.m.
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Leith Bade wrote:
I am having problems with exceptions generated inside wx.App.MainLoop,
after an upgrade from wxPython 2.4 to the current version.
Any unhandled exceptions are silently 'disappearing'.
I have verified it by raising a test exception just before
wx.App.MainLoop and it is printed to the console, but if I raise an
exceptioin inside a window event such as onIconize inside the main
window the excption is never printed, but the event terminates right
after the exception, and the program keeps on running..
It is getting really annoying as I am having to use pdb.set_trace at
the start of a problematic event to get a trace for any exceptions.
I would like all exceptions to be printed like they used to be.
I can't see what is causing this so maybe someone here will know.
Don't worry about this anymore I discovered in our code that stderr was
being redirected to a log file.
Under wxPython 2.4.x this code was broken so stderr was never
redirected, but under 2.8.x the code mysteriously started working and
the exceptions were being redirected!
Amazing what can happen in a large project when you upgrade libraries.
Leith
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Leith
Bade
···
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
Sent: Thursday, 8 January 2009 12:13 p.m.
To: wxpython-users@lists.wxwidgets.org
Subject: RE: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Can someone point me to where PyErr_Print() is called in the SVN, as I
am trying to find the excpetion handling code and see what it is doing.
Leith
-----Original Message-----
From:
wxpython-users-bounces+leith.bade=silentone.com@lists.wxwidgets.org
[mailto:wxpython-users-bounces+leith.bade=silentone.com@lists.wxwidgets.
org] On Behalf Of Leith Bade
Sent: Thursday, 8 January 2009 11:11 a.m.
To: wxpython-users@lists.wxwidgets.org
Subject: RE: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Does anyone know if the old defualt of calling PyErr_Print() on reuturn
from Python code has changed in the C++ code?
Is there a Python function one can override/hook to provide custom
exception handling code?
Leith
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Mike
Driscoll
Sent: Thursday, 8 January 2009 4:15 a.m.
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Missing unhandled sceptions in
wx.App.MainLoop
Leith Bade wrote:
I am having problems with exceptions generated inside wx.App.MainLoop,
after an upgrade from wxPython 2.4 to the current version.
Any unhandled exceptions are silently 'disappearing'.
I have verified it by raising a test exception just before
wx.App.MainLoop and it is printed to the console, but if I raise an
exceptioin inside a window event such as onIconize inside the main
window the excption is never printed, but the event terminates right
after the exception, and the program keeps on running..
It is getting really annoying as I am having to use pdb.set_trace at
the start of a problematic event to get a trace for any exceptions.
I would like all exceptions to be printed like they used to be.
I can't see what is causing this so maybe someone here will know.