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:
committed by
Tim Graham
parent
b91a2a499f
commit
f5d5867a4a
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user