Folded BaseHandler.get_friendly_error_response() into BaseHandler.get_response() to save the overhead of a function call, and because that logic didn't need to be abstracted.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-09-28 02:34:48 +00:00
parent f638234932
commit f22cd4ec05
1 changed files with 3 additions and 9 deletions

View File

@ -112,15 +112,9 @@ class BaseHandler(object):
request_repr = "Request repr() unavailable"
message = "%s\n\n%s" % (self._get_traceback(exc_info), request_repr)
mail_admins(subject, message, fail_silently=True)
return self.get_friendly_error_response(request, resolver)
def get_friendly_error_response(self, request, resolver):
"""
Returns an HttpResponse that displays a PUBLIC error message for a
fundamental error.
"""
callback, param_dict = resolver.resolve500()
return callback(request, **param_dict)
# Return an HttpResponse that displays a friendly error message.
callback, param_dict = resolver.resolve500()
return callback(request, **param_dict)
def get_technical_error_response(self, request, is404=False, exception=None):
"""