mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #24877 -- Added middleware handling of response.render() errors.
This commit is contained in:
parent
b91a2a499f
commit
f5d5867a4a
6 changed files with 47 additions and 10 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue