Traceback e-mails

Andrew just modified the Testament service to eliminate unsightly errors and immediately e-mail the service developers when an unexpected error occurs.

At some point, most Testament users will probably have encountered an uncaught exception (in non-programmer-speak, that’s an error that we haven’t anticipated and don’t handle gracefully) with a confusing looking error and traceback (a way for programmers to tell which sequence of events in the program caused the problem) that looks something like this:

Request Method: GET
Request URL: http://btptestament.com/log-package/2/
Django Version: 0.97-pre-SVN-7554
Python Version: 2.5.2
Installed Applications:
[‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.sites’,
‘django.contrib.admin’,
‘btp.core’]
Installed Middleware:
(‘django.middleware.common.CommonMiddleware’,
‘django.contrib.sessions.middleware.SessionMiddleware’,
‘django.contrib.auth.middleware.AuthenticationMiddleware’,
‘django.middleware.doc.XViewMiddleware’,
‘btp.core.middleware.RequireLoginMiddleware’)

Traceback:
File “/usr/lib/python2.5/site-packages/django/core/handlers/base.py” in get_response
82. response = callback(request, *callback_args, **callback_kwargs)
File “/var/www/testament/testament_trunk/btp/core/views.py” in package_address
205. add_infobox_context(request, context)
File “/var/www/testament/testament_trunk/btp/core/helpers.py” in add_infobox_context
66. if i.number == NULL_INMATE_NUMBER:

Exception Type: UnboundLocalError at /log-package/2/
Exception Value: local variable ‘i’ referenced before assignment

Now you won’t see this mess and we’ll get e-mailed when it happens so we can get the problem identified and fixed ASAP.

As always, if you want to report a bug, submit a feature request, or ask a question, please use the Testament Get Satisfaction Page.

This entry was posted in New Feature and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *