def handle_error(self):
        """Handle the last unanticipated exception.

        (Core)
        """
        try:
            self.hooks.run('before_error_response')
            if self.error_response:
                self.error_response()
            self.hooks.run('after_error_response')
            cherrypy.serving.response.finalize()
        except cherrypy.HTTPRedirect:
            inst = sys.exc_info()[1]
            inst.set_response()
            cherrypy.serving.response.finalize()
Handle the last unanticipated exception.

        (Core)
        
cherrypy/_cprequest.py