class ExceptionMiddleware  
 New in Django 1.10. 
Catches exceptions raised during the request/response cycle and returns the appropriate response.
- 
Http404is processed byhandler404(or a more friendly debug page ifDEBUG=True). - 
PermissionDeniedis processed byhandler403. - 
MultiPartParserErroris processed byhandler400. - 
SuspiciousOperationis processed byhandler400(or a more friendly debug page ifDEBUG=True). - Any other exception is processed by 
handler500(or a more friendly debug page ifDEBUG=True). 
Django uses this middleware regardless of whether or not you include it in MIDDLEWARE, however, you may want to subclass if your own middleware needs to transform any of these exceptions into the appropriate responses. LocaleMiddleware does this, for example.
Please login to continue.