def get_exception_response(self, request, resolver, status_code, exception):
        try:
            callback, param_dict = resolver.resolve_error_handler(status_code)
            # Unfortunately, inspect.getargspec result is not trustable enough
            # depending on the callback wrapping in decorators (frequent for handlers).
            # Falling back on try/except:
            try:
                response = callback(request, **dict(param_dict, exception=exception))
            except __HOLE__:
                warnings.warn(
                    "Error handlers should accept an exception parameter. Update "
                    "your code as this parameter will be required in Django 2.0",
                    RemovedInDjango20Warning, stacklevel=2
                )
                response = callback(request, **param_dict)
        except Exception:
            signals.got_request_exception.send(sender=self.__class__, request=request)
            response = self.handle_uncaught_exception(request, resolver, sys.exc_info())

        return response
dataset/ETHPy150Open django/django/django/core/handlers/base.py/BaseHandler.get_exception_response