1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #24877 -- Added middleware handling of response.render() errors.

This commit is contained in:
Sylvain Fankhauser
2015-06-05 15:30:03 +02:00
committed by Tim Graham
parent b91a2a499f
commit f5d5867a4a
6 changed files with 47 additions and 10 deletions

View File

@@ -32,3 +32,11 @@ def null_view(request):
def permission_denied(request):
raise PermissionDenied()
def exception_in_render(request):
class CustomHttpResponse(http.HttpResponse):
def render(self):
raise Exception('Exception in HttpResponse.render()')
return CustomHttpResponse('Error')