The formated 500 response pages you get with DEBUG = True will fail if the error that is raised is a string, instead of of subclass of python's Exception.
This view:
def raise_string_view(request):
raise 'String error!'
return render_to_response('some_template.html', {})
will throw this exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 277, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 631, in __call__
return self.application(environ, start_response)
File "/usr/local/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 205, in __call__
response = self.get_response(request)
File "/usr/local/lib/python2.5/site-packages/django/core/handlers/base.py", line 116, in get_response
return debug.technical_500_response(request, *sys.exc_info())
File "/usr/local/lib/python2.5/site-packages/django/views/debug.py", line 77, in technical_500_response
if issubclass(exc_type, TemplateDoesNotExist):
TypeError: issubclass() arg 1 must be a class