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:
parent
f638234932
commit
f22cd4ec05
|
@ -112,13 +112,7 @@ class BaseHandler(object):
|
||||||
request_repr = "Request repr() unavailable"
|
request_repr = "Request repr() unavailable"
|
||||||
message = "%s\n\n%s" % (self._get_traceback(exc_info), request_repr)
|
message = "%s\n\n%s" % (self._get_traceback(exc_info), request_repr)
|
||||||
mail_admins(subject, message, fail_silently=True)
|
mail_admins(subject, message, fail_silently=True)
|
||||||
return self.get_friendly_error_response(request, resolver)
|
# Return an HttpResponse that displays a friendly error message.
|
||||||
|
|
||||||
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()
|
callback, param_dict = resolver.resolve500()
|
||||||
return callback(request, **param_dict)
|
return callback(request, **param_dict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue