PATRICK ROBERTS'S BLOG

egoFile.com/blog: Formalizing Intelligence in Code

Sun, 12 Sep 2004

Fancy wxPython Exception Handler

My wxsupportwiz.py module has made it easy to solve most of the bugs that users have found in egoClip. I guess it resembles Mozilla's Quality Feedback Agent, except it doesn't catch crashes in Python extensions, but those are rare.

When an exception goes uncaught, it pops up a little window asking the user if it's okay to send error information to your website. Then it POSTs to your CGI script almost anything you could want about the error:

In egoClip's case, the CGI presently just e-mails me everything. The CGI could also match the error details to a set of solutions and output the URL to a page of instructions that the module will popup in the user's webbrowser.

To hook it up, just:

import wxsupportwiz
wxsupportwiz.wxAddExceptHook('http://egofile.com/naughty_users.php')

As usual, let me know if you find this useful or if you have suggestions.

permanent link

©2004-2008 Patrick Roberts | Burlington, Ontario, Canada