After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694584 - Improve exception handling for callbacks
Improve exception handling for callbacks
Status: RESOLVED DUPLICATE of bug 616279
Product: pygobject
Classification: Bindings
Component: general
3.4.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-24 12:30 UTC by Christoph Reiter (lazka)
Modified: 2013-02-27 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christoph Reiter (lazka) 2013-02-24 12:30:42 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.
Comment 1 Simon Feltman 2013-02-25 03:12:08 UTC
This is closely related to bug 616036 if not a dup.
Comment 2 Simon Feltman 2013-02-25 03:13:18 UTC
err I mean bug 616279
Comment 3 Martin Pitt 2013-02-27 16:40:01 UTC

*** This bug has been marked as a duplicate of bug 616279 ***