GNOME Bugzilla – Bug 694584
Improve exception handling for callbacks
Last modified: 2013-02-27 16:40:01 UTC
I'm currently porting pygtk code to pygobject and because most callbacks need a change in the argument list (user_data etc.) those fail with "TypeError: blah" I have a hard time locating the cause of the errors, so I propose some improvements in that area: 1) Include the callback function in the stacktrace so I know where it is failing (not just the name.. doesn't help with lambda). 2) Prepend the stacktrace for when the callback was passed to pygobject. 3) Use sys.excepthook for unhandled exceptions in callbacks. We use it to pop up a debug dialog and allow the user to submit a bug report. If the error is in a callback the error goes unnoticed.
This is closely related to bug 616036 if not a dup.
err I mean bug 616279
*** This bug has been marked as a duplicate of bug 616279 ***